在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
---恢复内容开始---
# rpm -qa | grep httpd 说明:检查是否安装了httpd软件包 如果有,就使用 rpm -e httpd-2.2.3-63.el5.centos --nodeps 说明:卸载软件包, --nodeps 如果有连带关系,也强制卸载 # cd /etc/httpd/ # rm -rf * 说明:到原来的apache安装目录下,将其所有的安装目录和文件都删掉 b. 卸载Mysql # rpm -qa | grep mysql # rpm -e mysql-5.0.77-4.el5_4.2 --nodeps 说明:卸载mysql c. 卸载Php # rpm -qa | grep php # rpm -e php-common-5.1.6-27.el5 --nodeps # rpm -e php-ldap-5.1.6-27.el5 --nodeps # rpm -e php-cli-5.1.6-27.el5 --nodeps # rpm -e php-5.1.6-27.el5 --nodeps 说明:卸载PHP 4、清空防火墙规则
4、关闭selinux vi /etc/selinux/config
三、安装LAMP 1、安装zlib tar zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure
make && make install
zlib指定安装目录可能造成libpng安装失败,故不指定,为卸载方便,建议make install执行结果输出到安装日志文件,便于日后卸载。
2、安装libxml2
cd libxml2-2.6.32
./configure --prefix=/usr/local/libxml2
make && make install 3、安装libmcrypt cd libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcryp
make && make install 4.安装libpng tar zxvf libpng-1.5.27.tar cd libpng-1.5.27.tar ./configure --prefix=/usr/local/libpng
make && make install
5、安装jpeg库
mkdir /usr/local/jpeg6
mkdir /usr/local/jpeg6/bin
mkdir /usr/local/jpeg6/lib
mkdir /usr/local/jpeg6/include
mkdir -p /usr/local/jpeg6/man/man1
./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
make && make install
--enable-shared 与--enable-static参数分别为建立共享库和静态库使用的libtool
6、安装freetype 字体
tar zxvf freetype-2.6.1.tar
cd freetype-2.6.1
./configure --prefix=/usr/local/freetype
make && make install
7、安装autoconf
tar zxvf autoconf-2.69.tar
cd autoconf-2.69
./configure && make && make install
报错提示缺少perl,使用yum -y install perl 然后在进行编译安装(下面是成功之后的) 8、安装GD库
tar zxvf libgd-2.1.1.tar.gz
cd ibgd-2.1.1
./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpep6/ --with-freetype=/usr/local/freetype --with-png=/usr/local/libpng
make && make install
9、安装cmake(mysql从5.5开始编译要用cmkae编译,所以要安装cmake) tar zxvf cmake-2.8.12.2.tar cd cmake-2.8.12.2 ./bootstrap
gmake gmake install 10、安装Apache ./configure --prefix=/usr/local/apache2 \ make && make install 测试apache2是否安装成功 /usr/local/bin/apachetcl start 启动apache2 如果不想看见底下那一行,进入/etc/httpd.conf文件 查看80端口是否开启 访问Apache服务器 添加自启动 11、安装Mysql 1.安装ncur yum -y install ncur* bison 2、添加mysql用户并加到mysql组中
useradd -r -s /sbin/nologin mysql
mkdir -pv /usr/local/mysql/data
3.下载mysql并进行编译安装
tar zxvf mysql-5.6.32.tar.gz
cd mysql-5.7.14
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/usr/local/mysql/data \ make && make install rm -rf /etc/my.cnf
cp support-files/my-default.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
chown -R mysql.mysql /usr/local/mysql/
##初始化数据库
chmod +x scripts/mysql_install_db
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
ln -s /usr/local/mysql/bin/* /usr/bin/
ln -s /usr/local/mysql/lib/* /usr/lib/
ln -s /usr/local/mysql/man/man1/* /usr/share/man/man1
ln -s /usr/local/mysql/man/man8/* /usr/share/man/man8
ln -s /usr/local/mysql/libexec/* /usr/local/libexec
4、启动mysql服务并加入开机自启动
service mysqld start
chkconfig mysqld on
5、验证mysql服务是否启动
netstat -tulnp | grep 3306
mysql
12、安装PHP
1.安装libtool以及libtool-ltdl*
wget
tar zxvf
cd
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/lib/mysql --enable-fpm --with-mcrypt --enable-mbstring --disable-pdo --with-curl --disable-debug --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli --with-gd --with-jpeg-dir
make && make install
|
2022-08-17
2022-09-18
2022-08-17
2022-07-29
2022-08-15
请发表评论