|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
小知识:Linux可安装在各种计算机硬件设备中,比如手机、平板电脑、路由器、视频游戏控制台、台式计算机、大型机和超级计算机。
安装依附库和开辟情况
yum-yinstallgccgcc-c++autoconflibjpeglibjpeg-devellibpnglibpng-develfreetypefreetype-devel
libxml2libxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develncurses
ncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5krb5-devellibidnlibidn-devel
opensslopenssl-developenldapopenldap-develnss_ldapopenldap-clients
openldap-serverscmake-*wget
#Nginx
yum-yinstallpcre-develzlib-devel
#Php
yum-yinstallgd-devellibjpeg-devellibpng-develfreetype-devellibxml2-develcurl-develfreetype-devel
#Mysql
yum-yinstallbisongccgcc-c++autoconfautomakezlib*libxml*ncurses-devellibtool-ltdl-devel*mysql-devel
下载软件包
- #创立目次
- mkdir/web
- cd/web
- #PHP5.4.1
- wgethttp://www.centoscn.com/tool/php-5.4.1.tar.bz2
- #PHP库文件
- wgethttp://ncu.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
- wgethttp://ncu.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
- wgethttp://ncu.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
- #Nginx1.0.9
- wgethttp://www.nginx.org/download/nginx-1.3.9.tar.gz
- #Nginx(pcre)
- wgethttp://www.centoscn.com/tool/pcre-8.13.tar.gz
- #Mysql5.5.21
- wgethttp://www.centoscn.com/tool/mysql-5.5.21.tar.gz
安装Mysql
- #增加mysql用户
- /usr/sbin/groupaddmysql
- /usr/sbin/useradd-gmysqlmysql
- mkdir-p/data/mysql
- mkdir-p/usr/local/supper
- chown-Rmysql:mysql/data/mysql
- #安装Mysql
- tar-zxvfmysql-5.5.21.tar.gz
- cdmysql-5.5.21
- cmake-DCMAKE_INSTALL_PREFIX=/usr/local/supper/mysql
- -DSYSCONFDIR=/etc
- -DMYSQL_UNIX_ADDR=/tmp/mysql.sock
- -DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci
- -DEXTRA_CHARSETS=all
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MEMORY_STORAGE_ENGINE=1
- -DWITH_READLINE=1
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_DATADIR=/data/mysql
- -DMYSQL_USER=mysql-DWITH_DEBUG=0
- #设置Mysql
- #在support-files目次中有五个设置信息文件:
- #my-small.cnf(内存<=64M)
- #my-medium.cnf(内存128M)
- #my-large.cnf(内存512M)
- #my-huge.cnf(内存1G-2G)
- #my-innodb-heavy-4G.cnf(内存4GB)
- cd/usr/local/mysql
- cp./support-files/my-medium.cnf/etc/my.cnf
- vi/etc/my.cnf
- #在[mysqld]段增添
- datadir=/data/mysql
- wait-timeout=30
- max_connections=512
- default-storage-engine=MyISAM
- #在[mysqld]段修正
- max_allowed_packet=16M
- #天生受权表
- cd/usr/local/supper/mysql
- ./scripts/mysql_install_db--user=mysql
- #变动暗码
- /usr/local/supper/mysql/bin/mysqladmin-urootpassword123456
- #开启mysql
- /usr/local/supper/mysql/bin/mysqld_safe&
- #测试毗连mysql
- /usr/local/supper/mysql/bin/mysql-uroot-p123456
- showdatabases;
- exit;
- #设置开机启动
- vi/etc/rc.d/rc.local
- #到场
- /usr/local/supper/mysql/bin/mysqld_safe&
安装PHP
- #1
- tar-zxvflibmcrypt-2.5.8.tar.gz&&cdlibmcrypt-2.5.8/
- ./configure&&make&&makeinstall
- /sbin/ldconfig&&cdlibltdl/&&./configure--enable-ltdl-install
- make&&makeinstall&&cd../
- #2
- tar-zxvfmhash-0.9.9.9.tar.gz&&cdmhash-0.9.9.9/&&./configure
- make&&makeinstall&&cd../
- #3
- ln-s/usr/local/lib/libmcrypt.la/usr/lib/libmcrypt.la
- ln-s/usr/local/lib/libmcrypt.so/usr/lib/libmcrypt.so
- ln-s/usr/local/lib/libmcrypt.so.4/usr/lib/libmcrypt.so.4
- ln-s/usr/local/lib/libmcrypt.so.4.4.8/usr/lib/libmcrypt.so.4.4.8
- ln-s/usr/local/lib/libmhash.a/usr/lib/libmhash.a
- ln-s/usr/local/lib/libmhash.la/usr/lib/libmhash.la
- ln-s/usr/local/lib/libmhash.so/usr/lib/libmhash.so
- 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
- ln-s/usr/local/bin/libmcrypt-config/usr/bin/libmcrypt-config
- #4
- tar-zxvfmcrypt-2.6.8.tar.gz&&cdmcrypt-2.6.8/
- /sbin/ldconfig
- ./configure
- make&&makeinstall&&cd../
- #5
- tar-xjvfphp-5.4.1.tar.bz2
- cdphp-5.3.8
- ./configure--prefix=/usr/local/php
- --with-config-file-path=/usr/local/supper/php/etc
- --with-freetype-dir
- --with-mysql=/usr/local/supper/mysql
- --with-mysqli=/usr/local/supper/mysql/bin/mysql_config
- --with-jpeg-dir--with-png-dir--with-zlib
- --with-mhash--enable-sockets--enable-ftp
- --with-libxml-dir--enable-xml--disable-rpath
- --enable-safe-mode--enable-bcmath
- --enable-shmop--enable-sysvsem
- --enable-inline-optimization--with-curl
- --with-curlwrappers
- --enable-mbregex
- --enable-mbstring--with-mcrypt--with-gd
- --enable-gd-native-ttf--with-openssl--with-mhash
- --enable-pcntl--enable-sockets--with-ldap--with-ldap-sasl
- --enable-fpm
- --with-xmlrpc--enable-zip--enable-soap
- --without-pear
- makeZEND_EXTRA_LIBS=-liconv
- #注重这里简单呈现make:***[ext/phar/phar.php]毛病127
- #呈现mysqlclient办理***
- #ln-s/usr/local/mysql/lib/libmysqlclient.so/usr/lib/
- #ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib/libmysqlclient.so.18
- #大概chmod:没法会见“ext/phar/phar.phar”:没有谁人文件或目次
- #make:[ext/phar/phar.phar]毛病1(疏忽)
- #办理***在编译的时分加--without-pear参数
- #假如还不可,make的时分不增加ZEND_EXTRA_LIBS=-liconv参数
- makeinstall
- #选择PHP.ini设置文件
- cpphp.ini-production/usr/local/php/etc/php.ini
变动PHP-FPM
<divclass="dp-highlighter"style="margin:0pxauto;padding:0px;border:1pxsolidrgb(232,232,232);background-color:rgb(252,252,252);font-family:Verdana,Tahoma,LucidaGrande,Arial,sans-serif;width:693px;overflow:auto;color:rgb(0,0,0);line-height:24px;">
<olclass="dp-perl"style="margin:0px0px1px32px;padding:2px;border:0px;background-color:transparent;color:rgb(43,145,175);"><liclass="alt"style="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;">#增加WWW用户<listyle="border-left-width:1px;border-left-style:solid;border-left-color:rgb(209,215,220);padding-left:10px;line-height:18px;"> |
|