start the SSH service
Service sshd Start
Yum-y Update
View the CentOS version
CentOS 5 Execution:
Copy the Code code as follows:
RPM-UVH http://mirror.webtatic.com/yum/el5/latest.rpm
CentOS 6 Execution:
Copy the Code code as follows:
RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm
Yum Install PHP
Copy the Code code as follows:
Yum install php55w Php55w-bcmath php55w-cli Php55w-common
Php55w-devel php55w-fpm php55w-gd Php55w-imap php55w-ldap
Php55w-mbstring php55w-mcrypt php55w-mysql Php55w-odbc php55w-pdo
Php55w-pear php55w-pecl-igbinary Php55w-xml Php55w-xmlrpc
Php55w-opcache Php55w-intl Php55w-pecl-memcache
Installation Complete
Whereis PHP
Start PHP-FPM
Copy the Code code as follows:
/ETC/RC.D/INIT.D/PHP-FPM start
Installing Redis Server
> Yum install wget make gcc gcc-c++ zlib-devel OpenSSL openssl-devel> pcre-devel kernel keyutils patch perl> > mkdir/tmp/redis> > Cd/tmp/redis> > wget http://download.redis.io/releases/redis-2.8.8.tar.gz> > Tar XZF redis-*> > CD redis-*> > Make> > sudo make install clean> > mkdir/etc/redis> > CP redis . conf/etc/redis/redis.conf
Modifying the Conf configuration
Copy the Code code as follows:
Vim/etc/redis/redis.conf
Example/n keyword to modify
Copy the Code code as follows:
> Daemonize Yes
>
> Port 6379
>
> Bind 127.0.0.1
>
> dir/var/opt
To see if the installation was successful
Copy the Code code as follows:
> Whereis redis-server
>
>/usr/local/bin/redis-server/etc/redis/redis.conf
>
> REDIS-CLI
Installing Phpredis
Download Address
Https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz
Upload phpredis-2.2.4.tar.gz to/usr/local/src directory
> cd/usr/local/src> > Tar zxvf phpredis-2.2.4.tar.gz> > cd phpredis-2.2.4> >/usr/local/php/bin/php ize> > Whereis php> >/usr/bin/phpize> >/usr/bin/php/bin/phpize> > Find/-name "Phpize" > > ./configure--with-php-config=/usr/bin/php-config> > Make> > Make install> > > Vim/usr/bin/php.ini
After the installation is complete, the following installation path appears
Copy the Code code as follows:
>/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
3. Configure PHP support to add in php.ini
Copy the Code code as follows:
> extension= "redis.so"
Restart PHP-FPM
Copy the Code code as follows:
>/ETC/RC.D/INIT.D/PHP-FPM Stop
>
>/ETC/RC.D/INIT.D/PHP-FPM Start
>
> php-r "if (new Redis () = = true) {echo \" \ r \ n ok \r\n\ ";}"
OK, that was a success.
Installing Xdebug
To official website http://www.xdebug.com/download.php
Linux system Download source version tgz compressed package
> TAR-XVZF xdebug-2.3.1.tgz> > cd xdebug-2.3.1> > Phpize> > ./configure> > Make> > Make install> > CP modules/xdebug.so/usr/include/php/ext//move xdebug.so file to PHP
Ext can be found through find.
Edit PHP.ini, add the following configuration, the general functions are open
1818 [xdebug]1819 zend_extension= "/usr/include/php/ext/xdebug.so" 1820 xdebug.trace_output_dir= "/tmp/php/xdebug" 1821 xdebug.profiler_output_dir= "/tmp/php/xdebug" 1822 xdebug.profiler_output_name= "Callgrind.out.%s.%t" 1823 Xdebug.profiler_enable=on 1824 xdebug.profiler_enable_trigger=1 1825 xdebug.default_enable=1 1826 Xdebug.show_ Exception_trace=on 1827 xdebug.show_local_vars=0 1828 xdebug.max_nesting_level=300 1829 xdebug.var_display_max_depth =6 1830 xdebug.dump_once=on 1831 Xdebug.dump_globals=on 1832 xdebug.dump_undefined=on 1833 xdebug.dump.GET=* 1834 Xdebug . Dump. Server=remote_addr 1835 xdebug.dump.request=* 1836 xdebug.dump.server=request_method,request_uri,http_user_agent 1837 xdebug.remote_connect_back=1 1838 xdebug.remote_enable=1 1839 XDEBUG.REMOTE_HANDLER=DBGP 1840 Xdebug.remote_mode =req 1841 xdebug.cli_color=1 1842 xdebug.trace_format=0 1843 xdebug.auto_trace=on 1844 xdebug.force_display_errors= 1 18 Xdebug.collect_assignments=on 1846 xdebug.force_error_reporting = 1 1847 Display_startup_errors=1 1848 allow_url_include=1 1849 always_populate_raw_post_data=1 1850 Asp_tags=1 1851 Xdebug.scream=0 1852 xdebug.collect_return=1 1853 xdebug.collect_vars=1 1854 xdebug.remote_host = 127.0.0.1 1855 Xdebug. Collect_params=on 1856 xdebug.collect_params=4 1857 How_local_vars=on 1858 xdebug.idekey= "PHPSTORM" 1859 xdebug.dump.cookie=* 1860 xdebug.dump.env=* 1861 xdebug.dump.files=* 1862 xdebug.dump.post=* 1863 xdebug.dump.SERVER=* 1864 xdebug.dump.session=* 1865 xdebug.file_link_format=* 1866 xdebug.profiler_aggregate=1 1867 Xdebug.profiler_ Append=1 1868 xdebug.profiler_enable_trigger_value=* 1869 xdebug.remote_autostart=1 1870 Xdebug.show_local_vars=1 1871 Xdebug.show_mem_delta=1 1872 Xdebug.trace_enable_trigger=1
Installing Nginx
Copy the Code code as follows:
> Yum Install nginx-y
The installation is complete, the following directly can start Nginx:
Copy the Code code as follows:
>/etc/init.d/nginx Start
>
>/etc/init.d/iptables Stop shutting down the firewall
>
>/etc/nginx/nginx.conf # nginx configuration file location
PHP error, Nginx reported 502 error in nginx.conf 502 comments out
Configuration of the Laravel5
> Server {> Listen 80;> server_name baidu.com;> set $index _file index.php;> Location/{> root /opt/www/baidu/public;> index index.html index.htm index.php;> > if (! -e $request _filename) {> rewrite ^/(. *) $/index.php?$1 last;> break;> }> Index $index _file;> > } location ~ \.php$ { root html; Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; > Fastcgi_param script_filename >/opt/www/baidu/public/$fastcgi _script_name; Include > Fastcgi_params; }}
Install MySQL
Copy the Code code as follows:
> Yum install MySQL mysql-server
Set boot up
> Chkconfig mysqld on> > Mysql-u root> > mysql> Select User,host,password from mysql.user;> mysql> ; Set password for Root@localhost=password (' 123456 '); mysql> exitshow databases;use laravel5;show tables;
The above mentioned is the whole content of this article, I hope you can like.
Please take a moment to share the article with your friends or leave a comment. We would be grateful for your support!