网站首页 > 技术教程 正文
Part 1.
(1)删除Linux系统默认安装的web服务器软件包,如:httpd、mysql、php等,卸载可以用以下命令 [root@test.com~]#rpm -e httpd
[root@test.com~]#rpm -e php
[root@test.com~]#rpm -e mysql
复制代码(2)使用yum更新系统组件 [root@test.com~]#yum -y install yum-fastestmirror
[root@test.com~]#yum -y update
[root@test.com~]#yum -y install patch make gcc gcc-c++ gcc-g77 flex bison file
[root@test.com~]#yum -y install libtool libtool-libs autoconf kernel-devel
[root@test.com~]#yum -y install libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel
[root@test.com~]#yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel
[root@test.com~]#yum -y install glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel
[root@test.com~]#yum -y install ncurses ncurses-devel curl curl-devel e2fsprogs
[root@test.com~]#yum -y install openssl openssl-devel vim-minimal nano sendmail
[root@test.com~]#yum -y install fonts-chinese gettext gettext-devel
[root@test.com~]#yum -y install ncurses-devel
[root@test.com~]#yum -y install gmp-devel pspell-devel
[root@test.com~]#yum -y install unzip
复制代码(3)准备安装需要使用的软件包,使用wget下载
>1.php-5.2.10
>2.php-5.2.10-fpm-0.5.13
>3.sohusin-patch-5.2.10-0.9.7.patch.gz
>4.PDO_MySQL-1.0.2
>5.memcache2.2.5
>6.Pcre7.9
>7.Nginx0.7.65
>8.MySQL5.1.44
>9.libiconv
>10.libmcrypt
>11.mhash
>12.mcrypt
Part 2.安装
//install libiconv [root@test.com~]#tar zxvf libiconv-1.13.tar.gz
[root@test.com~]#cd libiconv-1.13/
[root@test.com~]#./configure --prefix=/usr/local
[root@test.com~]#make && make install
[root@test.com~]#cd ../
//install libmcrypt
[code]
[root@test.com~]#tar zxvf libmcrypt-2.5.8.tar.gz
[root@test.com~]#cd libmcrypt-2.5.8/
[root@test.com~]#./configure
[root@test.com~]#make && make install
[root@test.com~]#/sbin/ldconfig
[root@test.com~]#cd libltdl/
[root@test.com~]#./configure --enable-ltdl-install
[root@test.com~]#make && make install
[root@test.com~]#cd ../../
复制代码//install mhash [root@test.com~]#tar zxvf mhash-0.9.9.9.tar.gz
[root@test.com~]#cd mhash-0.9.9.9/
[root@test.com~]#./configure
[root@test.com~]#make && make install
[root@test.com~]#cd ../
复制代码//使用ln -s 命令给lib组件建立软连接 [root@test.com~]#ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
[root@test.com~]#ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
[root@test.com~]#ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
[root@test.com~]#ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
[root@test.com~]#ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
[root@test.com~]#ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
[root@test.com~]#ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
[root@test.com~]#ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
复制代码//install mcrypt [root@test.com~]#tar zxvf mcrypt-2.6.8.tar.gz
[root@test.com~]#cd mcrypt-2.6.8/
[root@test.com~]#./configure
[root@test.com~]#make && make install
[root@test.com~]#cd ../
复制代码//install mysql [root@test.com~]#tar -zxvf mysql-5.1.44.tar.gz
[root@test.com~]#cd mysql-5.1.44/
[root@test.com~]#./configure --prefix=/usr/local/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-assembler --with-charset=utf8 --enable-thread-safe-client --with-extra-charsets=all --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile
[root@test.com~]#make && make install
[root@test.com~]#cd ../
复制代码//使用独立用户运行mysql [root@test.com~]#groupadd mysql
[root@test.com~]#useradd -g mysql mysql
[root@test.com~]#cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
[root@test.com~]#/usr/local/mysql/bin/mysql_install_db --user=mysql
[root@test.com~]#chown -R mysql /usr/local/mysql/var
[root@test.com~]#chgrp -R mysql /usr/local/mysql/.
[root@test.com~]#cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
[root@test.com~]#chmod 755 /etc/init.d/mysql
[root@test.com~]#chkconfig --level 345 mysql on
[root@test.com~]#echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
[root@test.com~]#echo "/usr/local/lib" >>/etc/ld.so.conf
[root@test.com~]#ldconfig
[root@test.com~]#ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
[root@test.com~]#ln -s /usr/local/mysql/include/mysql /usr/include/mysql
[root@test.com~]#/etc/init.d/mysql start
[root@test.com~]#/usr/local/mysql/bin/mysqladmin -u root password $pwd(这里换成自己的密码)
[root@test.com~]#/etc/init.d/mysql restart
[root@test.com~]#/etc/init.d/mysql stop
[root@test.com~]#chkconfig mysql-ndb off
[root@test.com~]#chkconfig mysql-ndb-mgm off
复制代码//install php [root@test.com~]#tar zxvf php-5.2.10.tar.gz
[root@test.com~]#gzip -d ./suhosin-patch-5.2.10-0.9.7.patch.gz
[root@test.com~]#gzip -cd php-5.2.10-fpm-0.5.13.diff.gz | patch -d php-5.2.10 -p1
[root@test.com~]#cd php-5.2.10/
[root@test.com~]#patch -p 1 -i ../suhosin-patch-5.2.10-0.9.7.patch
[root@test.com~]#./buildconf --force
[root@test.com~]#./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin
make ZEND_EXTRA_LIBS='-liconv'
[root@test.com~]#make install
[root@test.com~]#cp php.ini-dist /usr/local/php/etc/php.ini
[root@test.com~]#cd ../
复制代码//install memcache [root@test.com~]#tar zxvf memcache-2.2.5.tgz
[root@test.com~]#cd memcache-2.2.5/
[root@test.com~]#/usr/local/php/bin/phpize
[root@test.com~]#./configure --with-php-config=/usr/local/php/bin/php-config
[root@test.com~]#make && make install
[root@test.com~]#cd ../
复制代码//install PDO_MySQL [root@test.com~]#tar zxvf PDO_MYSQL-1.0.2.tgz
[root@test.com~]#cd PDO_MYSQL-1.0.2/
[root@test.com~]#/usr/local/php/bin/phpize
[root@test.com~]#./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql
[root@test.com~]#make
[root@test.com~]#make install
[root@test.com~]#cd ../
复制代码[root@permit~]#groupadd www
[root@permit~]#useradd -g www www
[root@permit~]#mkdir -p /web/wwwroot
[root@permit~]#chmod +w /web/wwwroot
[root@permit~]#mkdir -p /web/wwwroot/logs
[root@permit~]#chmod 777 /web/wwwroot/logs
复制代码//install pcre [root@test.com~]#tar zxvf pcre-7.9.tar.gz
[root@test.com~]#cd pcre-7.9/
[root@test.com~]#./configure
[root@test.com~]#make && make install
[root@test.com~]#cd ../
复制代码//install nginx [root@test.com~]#tar zxvf nginx-0.7.65.tar.gz
[root@test.com~]#cd nginx-0.7.65/
[root@test.com~]#./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
[root@test.com~]#make && make install
[root@test.com~]#cd ../
猜你喜欢
- 2024-10-14 使用Docker 搞定PHP开发环境(docker php.ini)
- 2024-10-14 用Docker搭建Laravel和Vue项目的开发环境
- 2024-10-14 成为PHP语言编程高手不得不养成的5个习惯,你有几个?
- 2024-10-14 如何成为一名PHP编程高手?w3cschool分享php高手5大必由之路
- 2024-10-14 基于Docker一键LNMP(Nginx+MySQL+PHP7/5+Redis)安装程序
- 2024-10-02 Linux+Nginx+Mysql+PHP+Apache一键安装
- 2024-10-02 企业网站维护教程:解决Nginx的80端口占用导致的一系列问题
- 2024-10-02 Centos7下安装LNMP最新版(yum安装nginx和mysql,php源码安装)
- 2024-10-02 Mac Brew部署 Nginx + php +Mysql + phpMyAdmin 环境
- 2024-10-02 使用docker-compose安装php+nginx+memcached
你 发表评论:
欢迎- 最近发表
-
- Linux入门-普通用户赋予sudo权限(linux基础用户及权限管理的思维导图)
- Linux系统更改系统用户与密码,RK3568工控主板演示
- 在Windows服务器上安装Linux系统5种主要方法!
- Linux系统非root用户执行Docker命令
- 2、linux命令-用户管理(linux用户和用户组管理)
- Linux下安装常用软件都有哪些?做了一个汇总列表,你看还缺啥?
- Linux中wheel组的使用(centos wheel组和sudo)
- 信息安全实战案例:Linux系统用户权限管理
- Linux 组的管理:groupmod命令 + 练习 + 思维导图
- Linux中的用户管理(linux用户管理的命令)
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)