来自 金沙js77888 2019-11-03 11:30 的文章
当前位置: 金沙js77888 > 金沙js77888 > 正文

检查是否已安装

先执行find / -name httpd查看是否存在
rpm -qf httpd如果是安装了包,显示包名
rpm -ql 包名 

检查是否已安装,列出相关的包:

# rpm -qa |grep httpd
# rpm -qa |grep tomcat

# rpm -qa |grep php

# rpm -qa |grep MySql 

查看进程:
ps -ef |grep tomcat

ps -ef |grep httpd 

卸载:

[root@localhost ~]# rpm -qa|grep httpd
httpd-2.2.3-43.el5.CentOS

列出后卸载从最下面一个开始

# rpm -e httpd

强制删除目录:rm -rf 文件夹

yum clean all

[root@localhost ~]# cd /tmp

[root@localhost tmp]# yum -y install gcc gcc-c autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gd gd-devel

安装mysql:

[root@localhost ~]# tar zxvf  mysql-5.1.53.tar.gz
[root@localhost ~]# cd mysql-5.1.53

[root@localhost mysql-5.1.53]# ./configure --prefix =/usr/local/mysql --with-mysqld-user =zhouli --with-extra-charsets =all  --with-unix-socket-path =/usr/local/mysql/var/mysql.sock

[root@localhost mysql-5.1.53]# make && make install

[root@localhost mysql-5.1.53]# cd /usr/local/mysql/

[root@localhost mysql]# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf

[root@localhost mysql]#/usr/local/mysql/bin/mysql_install_db

[root@localhost mysql]# /usr/local/mysql/share/mysql/mysql.server start
[root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe --user=root

[root@localhost ~]# /usr/local/mysql/share/mysql/mysql.server start
[root@localhost ~]# /usr/local/mysql/bin/mysqladmin -u root password 123456

[root@localhost ~]# /usr/local/mysql/bin/mysql -u root -p

[root@localhost ~]# cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld

如果提示:

 No curses/termcap library found:yum -y install ncurses-devel 

useradd mysql    #添加用户
cp support-files/my-huge.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db  --user=mysql     #建立基本数据库
chown -R mysql:mysql  /usr/local/mysql/var/     #给mysql库的写权限
cd /usr/local/mysql/bin/
./mysqld_safe --user=mysql &      #启动数据库www.linuxidc.com
ps -aux |grep mysql      #检查是否正常启动
mysql -u root     #进入数据库以查看是否正常启动

修改mysql启动方式
cp /usr/local/mysql/share/mysql/mysql.server   /etc/init.d/mysqld  
chkconfig --add mysqld
service mysqld restart    #重新启动服务查看是否生效

图片 1

本文由金沙js77888发布于金沙js77888,转载请注明出处:检查是否已安装

关键词: js金沙国际