centos 6.5 配置nginx环境
1.卸载系统中默认的php和httpd
[root@x ~]# yum remove httpd* php*
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: php*
base | 3.7 kB :
base/primary_db | 3.6 MB :
extras | 3.4 kB :
extras/primary_db | kB :
updates | 3.4 kB :
updates/primary_db | 2.5 MB :
vz-base | B :
vz-base/primary | 1.3 kB :
vz-base /
vz-updates | B :
vz-updates/primary | 2.1 kB :
vz-updates /
Package(s) php* available, but not installed.
Resolving Dependencies
--> Running transaction check
---> Package httpd.i686 :2.2.-.el6.centos will be erased
---> Package httpd-tools.i686 :2.2.-.el6.centos will be erased
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================
Removing:
httpd i686 2.2.-.el6.centos installed 2.8 M
httpd-tools i686 2.2.-.el6.centos installed k Transaction Summary
=================================================================================================================================================================
Remove Package(s) Installed size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : httpd-2.2.-.el6.centos.i686 /
warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave
Erasing : httpd-tools-2.2.-.el6.centos.i686 /
Verifying : httpd-2.2.-.el6.centos.i686 /
Verifying : httpd-tools-2.2.-.el6.centos.i686 / Removed:
httpd.i686 :2.2.-.el6.centos httpd-tools.i686 :2.2.-.el6.centos Complete!
2.添加安装源
[root@x ~]# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Retrieving http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.2QHCGj: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [%]
:epel-release ########################################### [%]
3.安装nginx
[root@x ~]# yum install -y nginx
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink | kB :
* base: centos.sonn.com
* epel: linux.mirrors.es.net
* extras: centos.sonn.com
* updates: repos.lax.quadranet.com
epel | 4.3 kB :
epel/primary_db | 4.9 MB :
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nginx.i686 :1.0.-.el6 will be installed
--> Processing Dependency: nginx-filesystem = 1.0.-.el6 for package: nginx-1.0.-.el6.i686
--> Processing Dependency: nginx-filesystem for package: nginx-1.0.-.el6.i686
--> Processing Dependency: libxslt.so.(LIBXML2_1.0.18) for package: nginx-1.0.-.el6.i686
--> Processing Dependency: libxslt.so.(LIBXML2_1.0.11) for package: nginx-1.0.-.el6.i686
--> Processing Dependency: libxslt.so. for package: nginx-1.0.-.el6.i686
--> Processing Dependency: libgd.so. for package: nginx-1.0.-.el6.i686
--> Processing Dependency: libexslt.so. for package: nginx-1.0.-.el6.i686
--> Processing Dependency: libGeoIP.so. for package: nginx-1.0.-.el6.i686
--> Processing Dependency: gd for package: nginx-1.0.-.el6.i686
--> Processing Dependency: GeoIP for package: nginx-1.0.-.el6.i686
--> Running transaction check
---> Package GeoIP.i686 :1.6.-.el6 will be installed
--> Processing Dependency: geoipupdate for package: GeoIP-1.6.-.el6.i686
--> Processing Dependency: GeoIP-data for package: GeoIP-1.6.-.el6.i686
---> Package gd.i686 :2.0.-.el6 will be installed
--> Processing Dependency: libfreetype.so. for package: gd-2.0.-.el6.i686
--> Processing Dependency: libfontconfig.so. for package: gd-2.0.-.el6.i686
--> Processing Dependency: libXpm.so. for package: gd-2.0.-.el6.i686
--> Processing Dependency: libX11.so. for package: gd-2.0.-.el6.i686
---> Package libxslt.i686 :1.1.-.el6_3. will be installed
---> Package nginx-filesystem.noarch :1.0.-.el6 will be installed
--> Running transaction check
---> Package GeoIP-GeoLite-data.noarch :2015.04-.el6 will be installed
--> Processing Dependency: GeoIP-GeoLite-data-extra = 2015.04-.el6 for package: GeoIP-GeoLite-data-2015.04-.el6.noarch
---> Package fontconfig.i686 :2.8.-.el6 will be installed
---> Package freetype.i686 :2.3.-.el6_6. will be installed
---> Package geoipupdate.i686 :2.2.-.el6 will be installed
---> Package libX11.i686 :1.6.-.el6 will be installed
--> Processing Dependency: libX11-common = 1.6.-.el6 for package: libX11-1.6.-.el6.i686
--> Processing Dependency: libxcb.so. for package: libX11-1.6.-.el6.i686
---> Package libXpm.i686 :3.5.-.el6 will be installed
--> Running transaction check
---> Package GeoIP-GeoLite-data-extra.noarch :2015.04-.el6 will be installed
---> Package libX11-common.noarch :1.6.-.el6 will be installed
---> Package libxcb.i686 :1.9.-.el6 will be installed
--> Processing Dependency: libXau.so. for package: libxcb-1.9.-.el6.i686
--> Running transaction check
---> Package libXau.i686 :1.0.-.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================
Installing:
nginx i686 1.0.-.el6 epel k
Installing for dependencies:
GeoIP i686 1.6.-.el6 epel k
GeoIP-GeoLite-data noarch 2015.04-.el6 epel k
GeoIP-GeoLite-data-extra noarch 2015.04-.el6 epel M
fontconfig i686 2.8.-.el6 base k
freetype i686 2.3.-.el6_6. base k
gd i686 2.0.-.el6 base k
geoipupdate i686 2.2.-.el6 epel k
libX11 i686 1.6.-.el6 base k
libX11-common noarch 1.6.-.el6 base k
libXau i686 1.0.-.el6 base k
libXpm i686 3.5.-.el6 base k
libxcb i686 1.9.-.el6 base k
libxslt i686 1.1.-.el6_3. base k
nginx-filesystem noarch 1.0.-.el6 epel 8.1 k Transaction Summary
=================================================================================================================================================================
Install Package(s) Total download size: M
Installed size: M
Downloading Packages:
(/): GeoIP-1.6.-.el6.i686.rpm | kB :
(/): GeoIP-GeoLite-data-2015.04-.el6.noarch.rpm | kB :
(/): GeoIP-GeoLite-data-extra-2015.04-.el6.noarch.rpm | MB :
(/): fontconfig-2.8.-.el6.i686.rpm | kB :
(/): freetype-2.3.-.el6_6..i686.rpm | kB :
(/): gd-2.0.-.el6.i686.rpm | kB :
(/): geoipupdate-2.2.-.el6.i686.rpm | kB :
(/): libX11-1.6.-.el6.i686.rpm | kB :
(/): libX11-common-1.6.-.el6.noarch.rpm | kB :
(/): libXau-1.0.-.el6.i686.rpm | kB :
(/): libXpm-3.5.-.el6.i686.rpm | kB :
(/): libxcb-1.9.-.el6.i686.rpm | kB :
(/): libxslt-1.1.-.el6_3..i686.rpm | kB :
(/): nginx-1.0.-.el6.i686.rpm | kB :
(/): nginx-filesystem-1.0.-.el6.noarch.rpm | 8.1 kB :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.1 MB/s | MB :
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS- Key (CentOS Official Signing Key) <centos--key@centos.org>
Package: centos-release--.el6.centos.11.2.i686 (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL () <epel@fedoraproject.org>
Package: epel-release--.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : GeoIP-GeoLite-data-extra-2015.04-.el6.noarch /
Installing : GeoIP-GeoLite-data-2015.04-.el6.noarch /
Installing : libX11-common-1.6.-.el6.noarch /
Installing : nginx-filesystem-1.0.-.el6.noarch /
Installing : freetype-2.3.-.el6_6..i686 /
Installing : fontconfig-2.8.-.el6.i686 /
Installing : geoipupdate-2.2.-.el6.i686 /
Installing : GeoIP-1.6.-.el6.i686 /
Installing : libXau-1.0.-.el6.i686 /
Installing : libxcb-1.9.-.el6.i686 /
Installing : libX11-1.6.-.el6.i686 /
Installing : libXpm-3.5.-.el6.i686 /
Installing : gd-2.0.-.el6.i686 /
Installing : libxslt-1.1.-.el6_3..i686 /
Installing : nginx-1.0.-.el6.i686 /
Verifying : libX11-1.6.-.el6.i686 /
Verifying : nginx-filesystem-1.0.-.el6.noarch /
Verifying : freetype-2.3.-.el6_6..i686 /
Verifying : GeoIP-GeoLite-data-2015.04-.el6.noarch /
Verifying : libxslt-1.1.-.el6_3..i686 /
Verifying : GeoIP-1.6.-.el6.i686 /
Verifying : gd-2.0.-.el6.i686 /
Verifying : libX11-common-1.6.-.el6.noarch /
Verifying : libxcb-1.9.-.el6.i686 /
Verifying : nginx-1.0.-.el6.i686 /
Verifying : GeoIP-GeoLite-data-extra-2015.04-.el6.noarch /
Verifying : libXpm-3.5.-.el6.i686 /
Verifying : libXau-1.0.-.el6.i686 /
Verifying : fontconfig-2.8.-.el6.i686 /
Verifying : geoipupdate-2.2.-.el6.i686 / Installed:
nginx.i686 :1.0.-.el6 Dependency Installed:
GeoIP.i686 :1.6.-.el6 GeoIP-GeoLite-data.noarch :2015.04-.el6 GeoIP-GeoLite-data-extra.noarch :2015.04-.el6 fontconfig.i686 :2.8.-.el6
freetype.i686 :2.3.-.el6_6. gd.i686 :2.0.-.el6 geoipupdate.i686 :2.2.-.el6 libX11.i686 :1.6.-.el6
libX11-common.noarch :1.6.-.el6 libXau.i686 :1.0.-.el6 libXpm.i686 :3.5.-.el6 libxcb.i686 :1.9.-.el6
libxslt.i686 :1.1.-.el6_3. nginx-filesystem.noarch :1.0.-.el6 Complete!
4.设置nginx服务开机自启动
[root@x ~]# chkconfig --level nginx on
5.安装php和php-fpm
[root@x ~]# yum install -y php php-fpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* epel: linux.mirrors.es.net
* extras: centos.sonn.com
* updates: repos.lax.quadranet.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i686 :5.3.-.el6_6 will be installed
--> Processing Dependency: php-common(x86-) = 5.3.-.el6_6 for package: php-5.3.-.el6_6.i686
--> Processing Dependency: php-cli(x86-) = 5.3.-.el6_6 for package: php-5.3.-.el6_6.i686
--> Processing Dependency: httpd-mmn = for package: php-5.3.-.el6_6.i686
--> Processing Dependency: httpd for package: php-5.3.-.el6_6.i686
---> Package php-fpm.i686 :5.3.-.el6_6 will be installed
--> Running transaction check
---> Package httpd.i686 :2.2.-.el6.centos will be installed
--> Processing Dependency: httpd-tools = 2.2.-.el6.centos for package: httpd-2.2.-.el6.centos.i686
---> Package php-cli.i686 :5.3.-.el6_6 will be installed
---> Package php-common.i686 :5.3.-.el6_6 will be installed
--> Running transaction check
---> Package httpd-tools.i686 :2.2.-.el6.centos will be installed
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================
Installing:
php i686 5.3.-.el6_6 updates 1.1 M
php-fpm i686 5.3.-.el6_6 updates 1.2 M
Installing for dependencies:
httpd i686 2.2.-.el6.centos updates k
httpd-tools i686 2.2.-.el6.centos updates k
php-cli i686 5.3.-.el6_6 updates 2.2 M
php-common i686 5.3.-.el6_6 updates k Transaction Summary
=================================================================================================================================================================
Install Package(s) Total download size: 5.9 M
Installed size: M
Downloading Packages:
(/): httpd-2.2.-.el6.centos.i686.rpm | kB :
(/): httpd-tools-2.2.-.el6.centos.i686.rpm | kB :
(/): php-5.3.-.el6_6.i686.rpm | 1.1 MB :
(/): php-cli-5.3.-.el6_6.i686.rpm | 2.2 MB :
(/): php-common-5.3.-.el6_6.i686.rpm | kB :
(/): php-fpm-5.3.-.el6_6.i686.rpm | 1.2 MB :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total kB/s | 5.9 MB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.-.el6_6.i686 /
Installing : php-cli-5.3.-.el6_6.i686 /
Installing : httpd-tools-2.2.-.el6.centos.i686 /
Installing : httpd-2.2.-.el6.centos.i686 /
Installing : php-5.3.-.el6_6.i686 /
Installing : php-fpm-5.3.-.el6_6.i686 /
Verifying : httpd-2.2.-.el6.centos.i686 /
Verifying : php-fpm-5.3.-.el6_6.i686 /
Verifying : php-common-5.3.-.el6_6.i686 /
Verifying : httpd-tools-2.2.-.el6.centos.i686 /
Verifying : php-5.3.-.el6_6.i686 /
Verifying : php-cli-5.3.-.el6_6.i686 / Installed:
php.i686 :5.3.-.el6_6 php-fpm.i686 :5.3.-.el6_6 Dependency Installed:
httpd.i686 :2.2.-.el6.centos httpd-tools.i686 :2.2.-.el6.centos php-cli.i686 :5.3.-.el6_6 php-common.i686 :5.3.-.el6_6 Complete!
6.设置php-fpm服务开机自启动
[root@x ~]# chkconfig --level php-fpm on
7.安装php其他模块,如mysql相关模块php-mysql,xml相关模块php-xml等
[root@x ~]# yum install -y php-gd php-mysql php-mbstring php-xml php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
* epel: linux.mirrors.es.net
* extras: centos.sonn.com
* updates: repos.lax.quadranet.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i686 :5.3.-.el6_6 will be installed
---> Package php-mbstring.i686 :5.3.-.el6_6 will be installed
---> Package php-mcrypt.i686 :5.3.-.el6 will be installed
--> Processing Dependency: libmcrypt.so. for package: php-mcrypt-5.3.-.el6.i686
---> Package php-mysql.i686 :5.3.-.el6_6 will be installed
--> Processing Dependency: php-pdo(x86-) for package: php-mysql-5.3.-.el6_6.i686
--> Processing Dependency: libmysqlclient.so.(libmysqlclient_16) for package: php-mysql-5.3.-.el6_6.i686
--> Processing Dependency: libmysqlclient.so. for package: php-mysql-5.3.-.el6_6.i686
---> Package php-xml.i686 :5.3.-.el6_6 will be installed
--> Running transaction check
---> Package libmcrypt.i686 :2.5.-.el6 will be installed
---> Package mysql-libs.i686 :5.1.-.el6_6 will be installed
---> Package php-pdo.i686 :5.3.-.el6_6 will be installed
--> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================
Installing:
php-gd i686 5.3.-.el6_6 updates k
php-mbstring i686 5.3.-.el6_6 updates k
php-mcrypt i686 5.3.-.el6 epel k
php-mysql i686 5.3.-.el6_6 updates k
php-xml i686 5.3.-.el6_6 updates k
Installing for dependencies:
libmcrypt i686 2.5.-.el6 epel k
mysql-libs i686 5.1.-.el6_6 base 1.2 M
php-pdo i686 5.3.-.el6_6 updates k Transaction Summary
=================================================================================================================================================================
Install Package(s) Total download size: 2.2 M
Installed size: 7.1 M
Downloading Packages:
(/): libmcrypt-2.5.-.el6.i686.rpm | kB :
(/): mysql-libs-5.1.-.el6_6.i686.rpm | 1.2 MB :
(/): php-gd-5.3.-.el6_6.i686.rpm | kB :
(/): php-mbstring-5.3.-.el6_6.i686.rpm | kB :
(/): php-mcrypt-5.3.-.el6.i686.rpm | kB :
(/): php-mysql-5.3.-.el6_6.i686.rpm | kB :
(/): php-pdo-5.3.-.el6_6.i686.rpm | kB :
(/): php-xml-5.3.-.el6_6.i686.rpm | kB :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total kB/s | 2.2 MB :
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libmcrypt-2.5.-.el6.i686 /
Installing : mysql-libs-5.1.-.el6_6.i686 /
Installing : php-pdo-5.3.-.el6_6.i686 /
Installing : php-mysql-5.3.-.el6_6.i686 /
Installing : php-mcrypt-5.3.-.el6.i686 /
Installing : php-gd-5.3.-.el6_6.i686 /
Installing : php-mbstring-5.3.-.el6_6.i686 /
Installing : php-xml-5.3.-.el6_6.i686 /
Verifying : php-xml-5.3.-.el6_6.i686 /
Verifying : php-pdo-5.3.-.el6_6.i686 /
Verifying : mysql-libs-5.1.-.el6_6.i686 /
Verifying : php-mysql-5.3.-.el6_6.i686 /
Verifying : php-mbstring-5.3.-.el6_6.i686 /
Verifying : php-gd-5.3.-.el6_6.i686 /
Verifying : php-mcrypt-5.3.-.el6.i686 /
Verifying : libmcrypt-2.5.-.el6.i686 / Installed:
php-gd.i686 :5.3.-.el6_6 php-mbstring.i686 :5.3.-.el6_6 php-mcrypt.i686 :5.3.-.el6 php-mysql.i686 :5.3.-.el6_6 php-xml.i686 :5.3.-.el6_6 Dependency Installed:
libmcrypt.i686 :2.5.-.el6 mysql-libs.i686 :5.1.-.el6_6 php-pdo.i686 :5.3.-.el6_6 Complete!
8.完成上面操作后就可以启动nignx和php-fpm服务了
[root@x ~]# service php-fpm start
Starting php-fpm: [ OK ]
[root@x ~]# service nginx start
Starting nginx: [ OK ]
9.接下来我们需要详配置一下nginx服务器,如服务器主目录,用户等
(1).为nginx服务器添加一个专用账号
[root@x html]# useradd www
(2).创建nginx服务主目录并设置访问权限
[root@x html]# mkdir -p /home/www/domain.local/public_html
[root@x html]# mkdir -p /home/www/domain.local/log
[root@x html]# chown -R www.www /home/www/
[root@x html]# chmod /home/www/
(3).添加nginx配置文件,可以复制一份 /etc/nginx/conf.d/virtual.conf ,然后用以下配置覆盖原内容
[root@x html]# cd /etc/nginx/conf.d/
[root@x conf.d]# cp virtual.conf www.conf
[root@x conf.d]# vi www.conf
server {
server_name domain.local; #这里改为你的域名,其他不动
root /home/www/domain.local/public_html;
access_log /home/www/domain.local/log/domain.local-access.log;
error_log /home/www/domain.local/log/domain.local-error.log; location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
配置完成后保存退出,并检查是否有语法错误:
[root@x conf.d]# /etc/init.d/nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
如果你的输出信息和上面相似,则表示配置文件没有问题了。
(4).编辑php-fpm的配置文件,将用于nginx进程的用户和组修改为刚才创建的账号,即www
vi /etc/php-fpm.d/www.conf
在文件中搜索 user = apache 和 group = apache ,改为
user = www
group = www
(5).将nignx运行账号修改为www
[root@x conf.d]# vi /etc/nginx/nginx.conf
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/ user www; #这里修改为你创建的账号
(6).重启php-fpm和nignx服务
[root@x conf.d]# service nginx restart
Stopping nginx: [ OK ]
Starting nginx: [ OK ]
[root@x conf.d]# service php-fpm restart
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
10.配置防火墙
如果防火墙不开放80端口,是无法访问的,这里需要配置一下:
/sbin/iptables -I INPUT -p tcp --dport -j ACCEPT
/etc/rc.d/init.d/iptables save
11.至此,关于nginx服务器的基本配置都已经完成了,接下来可以测试一下
在/home/www/domain.local/public_html/ 目录中添加 info.php 文件,并加入如下代码:
<?php
phpinfo();
?>
保存退出后,访问此页面,如果能看到如下界面,则表示配置正确。
参考资料:http://www.lifelinux.com/how-to-install-nginx-and-php-fpm-on-centos-6-via-yum/
9SLGAR9BR]TIM%(N.png)
centos 6.5 配置nginx环境的更多相关文章
- 在CentOS/Windows下配置Nginx(以及踩坑)
在CentOS/Windows下配置Nginx(以及踩坑) 1. 序言 因为这类文章网上比较多,实际操作起来也大同小异,所以我并不会着重于详细配置方面,而是将我配置时踩的坑写出来. 2. CentOS ...
- CentOS 7 下配置 Nginx + PHP7.1 + MariaDB 以及 Laravel 框架 2018.3.11
CentOS 7 下配置 Nginx + PHP7.1 + MariaDB 以及 Laravel 框架 阿里云服务器的选择 当然是选择学生优惠啦.这里阿里云还提供了轻量级服务器这个选项,可以预装 LA ...
- CentOS 7 下配置 Nginx + PHP7.1 + MariaDB 以及 Laravel 框架
<!doctype html> CentOS 7 下配置 Nginx + PHP7.1 + MariaDB 以及 Laravel 框架.mdhtml {overflow-x: initia ...
- Linux(CentOS)上面搭建Nginx环境
总体上来说,Linux 这个系统其实挺好用的 除了看不见界面,但是用起来确实是比Window好用太多了,不废话了,直接说搭建环境的步骤! 安装Nginx 编译运行时的环境 参考博客:http://ww ...
- CentOS 7 安装 配置 Nginx + PHP
. CentOS 7 下配置 yum 安装 Nginx. 进入/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: cd /etc/yum.repos.d/ vim ngi ...
- CentOS中安装配置Nginx
一.安装Nginx '首先我们需要在nginx官网中下载nginx安装包,在这就下载最新版 nginx-1.13.7版本 下载完成以后我们进入下载页面进行查看 下载文件目录为 home/userNam ...
- CentOS安装、配置Nginx反向代理
添加Nginx存储库 sudo yum install epel-release 安装Nginx sudo yum install nginx 启动Nginx sudo systemctl start ...
- centos 为OPENJDK配置JAVA_HOME环境变量,安装MAVEN
1.安装开发者工具包 yum install java--openjdk-devel -y 2.配置环境变量 vim /etc/profile export JAVA_HOME=/usr/lib/jv ...
- LNMP笔记:阿里云32位 CentOS 5.4 配置 LNMP环境
最近比较郁闷的是 WordPress大学 服务器故障,由于诸多原因没及时处理,导致10多天无法访问.倡萌也是刚接触服务器环境配置,维护的确力不从心,没办法排查出错误根源,所以只好重置系统盘,重新配置L ...
随机推荐
- 转 Relinking Causes Many Warning on AIX
SYMPTOMS Relink returns many warnings Running make for target ioracle OPatch found the word "er ...
- linux C判断文件是否存在
access函数 功能描述: 检查调用进程是否可以对指定的文件执行某种操作. 用法: #include <unistd.h> #include <fcntl.h> int ...
- maya安装错误
AUTODESK系列软件着实令人头疼,安装失败之后不能完全卸载!!!(比如maya,cad,3dsmax等).有时手动删除注册表重装之后还是会出现各种问题,每个版本的C++Runtime和.NET f ...
- [转]how can I change default errormessage for invalid price
本文转自:http://forums.asp.net/t/1598262.aspx?how+can+I+change+default+errormessage+for+invalid+price I ...
- pat1048. Find Coins (25)
1048. Find Coins (25) 时间限制 50 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Eva loves t ...
- pat1093. Count PAT's (25)
1093. Count PAT's (25) 时间限制 120 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CAO, Peng The strin ...
- css3重点回顾字体
1.字体 免费字体下载https://cn.ffonts.net/
- MSSql中profiler工具介绍,
第一次使用profiler感觉真的是很方便. 他的作用可能有很多,但是我只是简单其中一点,就是查看某一时刻数据库执行了哪些操作,执行了哪些语句,执行语句所花费的时间.都可以很方便的查到,这对于我们优化 ...
- ViewData、ViewBag和TempData比较
一.ViewData.ViewBag和TempData的定义 public dynamic ViewBag { get; } public ViewDataDictionary ViewData { ...
- AngularJS 指令解析(一)
AngularJS 指令解析(一) 前言 笔者AngularJS接触时间差不多是两年多,虽然这两年多AngularJS版本日新月异,但是笔者的版本是比较老的1.4.3,一方面是自己对这个版本比较熟悉, ...