Installing amp
Apt-get Install apache2 mysql-server php5 php5-mysql5
Configure Apache2 Default Site
Vi/etc/apache2/sites-enabled/000-default
Join a row
Redirectmatch ^/$/apache2-default/
Testing this step does not require
Modifying the Apache2 master configuration
Vi/etc/apache2/apache2.conf
To change to:
Include Module Configuration:
Include/etc/apache2/mods-enabled/*.load include/etc/apache2/mods-enabled/
information in the binary image file is taken out, the class definition information in each module is parsed and read, the class and category of the Load method are recorded, and finally the call is uniformly executed.The Prepare_load_methods function is implemented as follows: void Prepare_load_methods (Header_info *hi) {Module mods; unsigned int midx; if (_objcheaderisreplacement (HI)) {return; } mods
Note: This example takes a subversion+apache patternOne: Required package downloadcompiling svn needs to rely on the SQLite Library,RHEL5 's own RPM package version is too low, the compilation can not pass. #wget Http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz#wget http://subversion.tigris.org/downloads/ Subversion-1.6.12.tar.bz2#wget http://archive.apache.org/dist/httpd/httpd-2.2.16.tar.gzSecond:SQLite Library compilation installation#tar-zxvf SQLITE-AMALGAMATION-3.6.13.TAR.GZ#CD Sqlite
Note: This installation is using the Ubuntu OS
First install Apache, PHP, MySQL, build the lamp environmentsudo apt-get install apache2 installation completed at the end of the following information: * Starting Web server apache2AH00558:apache2:Could not reliably determine the Server ' s fully qualified domain name, using 127.0.1.1. Set the ' ServerName ' directive globally to suppress this message *Based on the conclusion of the online search: no httpd.conf configured.Check apahe2.conf
file that contains the entry script in the directory .htaccess . Here is an example:
Options +followsymlinksindexignore */*rewriteengine on# If a directory or a file exists, use it directlyrewritecond%{requ Est_filename}!-frewritecond%{request_filename}!-d# otherwise forward it to index.phprewriterule. index.php
We then set the Showscriptname property of the Urlmanager element to be false .
Note Before formal testing, make sure that Apache opens the rewrite module, which is opened in Ubuntu in
multiple custom autoload function applications
First, create the mod folder under the test directory and create inmod. mod. php as follows:
The code is as follows:
Class inmod{Function _ construct (){Echo 'I am the in under the mods ';}}
Create the libs folder in the test Directory and create inlib. lib. php as follows:
The code is as follows:
Class inlib{Function _ construct (){Echo 'I am in libs ';}}
Finally, create loader. php in the test
start the extension. We will save it in file/etc/php5/mods-available/mongo.ini, add the following line:
Php5enmod MONGO
Copy CodeUse pecl again to install the Xhprof extender. The program is currently only a beta version, so the installation command is as follows:
PECL Install Xhprof-beta
Copy CodeThe command line again prompts us to add a row to php.in
This article mainly introduces about ThinkPHP5.0 Linux Apache/nginx rewrite URL configuration, has a certain reference value, now share to everyone, the need for friends can refer to
Author system is ubuntu,centos and other Linux distributions please change your ownPHP Framework is ThinkPHP5.0, the official document is somewhat vague, so I added a bitHave a mistake welcome to point out at any time
You can hide the application's portal file index.php through URL rewriting, whi
/cli/conf.d/05-opcache.ini - /etc/php5/cli/conf.d/10-pdo.ini - /etc/php5/cli/conf.d/20-json.ini - /etc/php5/cli/conf.d/20-mysql.ini - /etc/php5/cli/conf.d/20-mysqli.ini - /etc/php5/cli/conf.d/20-pdo_mysql.ini - /etc/php5/cli/conf.d/20-readline.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
After installing php-curl, delete all files in the Directory (including hidden files starting with.) and execute composer create-projec
?
2, please in the local environment, compile PHP, requirements: Version 5.4, 5.5, 5.6, each version to cover 3 compiled version, including NTS \ ZTS \ Debug
/usr/lib/apache2/modules
/etc/apache2/mods-enabled/
Vim Php5.load
. Compiling PHP's Ztf,ntf,debug mode
A. Installing the APSX tool Apt-get install Apache-dev
B. Run under the PHP source package./configure--prefix=/home/merlin/make_php_version/php-5.4-zts-debug/--enable-maintaine
PDT
Ide
(8) Zendstudio
Ide
(9) Phpstorm
Ide
(10) Ftp
File Transfer Protocol
(11) Ssh
Connect Server command
(12) Scp
Upload and download file commands
4.PHP Development Environment: (Build lamp environment under Unbuntu server)
First we can see how the following lamp works:
Note: Curd means to change the database and delete
Install Apache:
sudo apt-get install apache2
Apache2-v
Install PHP:
sudo apt-get install php5
Php5-v
Check if Apache has loaded the libphp5.
configuration file to generate Makefile:./configure
Generate shared libraries (such as redis.so): Make
Command line prompt to execute "make test", although not necessary, but careful to sail the boat AH ~ Brother!! If there's no problem here, let's move on.
Install: Make install
The end result is that the software has been installed in/usr/lib/php5/20121212/redis.so, the essence of which is to copy the shared library files that we generated earlier, and so on.
Wait, but, now the problem is
==> change to the amount of memory you need
Upload_max_filesize = = 2M ==> modified file max upload size
...
extension=mysql.so Support MySQL Service
Extension=gd.so supports GD functions
...
In fact, under Ubuntu, if you installed Php5-mysql and PHP5-GD, will automatically modify the above two lines, we do is just to confirm that their previous comment is removed.
A. Most of the current PHP open source is written in PhP4, in order to be compatible with the previous PHP version, sometimes need
Ide
(8) Zendstudio
Ide
(9) Phpstorm
Ide
(10) Ftp
File Transfer Protocol
(11) Ssh
Connect Server command
(12) Scp
Upload and download file commands
4.PHP Development Environment: (Build lamp environment under Unbuntu server)
First we can see how the following lamp works:
Note: Curd means to change the database and delete
Install Apache:
sudo apt-get install apache2
Apache2-v
Install PHP:
sudo apt-get install php5
Php5-v
Check if Apache has loaded the libphp5.so package:
Cat/ect/apache2/
Use lamp to build, decompression installation is done in sequence, first to the apache,mysql,php to operate, need to download from the Internet, I'll use Httpd-2.2.24.tar.bz2,mysql-5.1.45.tar.gz,php-5.3.27.tar.gz,discuz_x3.2_sc_utf8.zip.First, install Apache:1, Decompression: TAR-JVXF httpd-2.2.24.tar.bz2/test/#指定解压去指定目录---> cd/test/httpd-2.2.24.tar.bz22. Perform compilation and Installation---->./configure--prefix=/usr/local/apache2--enable-mods-shar
not chain empty, or the program restarts, the initial configuration, you will encounter a bug, unable to start.Here, for example, add the sentence at the end of the main configuration file/etc/apt/source.list. deb/httpcz.archive.ubuntu.com/ubuntu wily-updates Main is also possible.For another example, look at the directory structure of ETC/PHP5. To ask me how I generated it, look at my little work: Shell tree directory, just 20 lines of shell code can be implemented.When configuring the module,
Thinkphp hides index. php/home and allows access to other modules. thinkphpindex. php
The result is very simple. I have two modules: Home and Wechat.
Http: // localhost/index. php/home/index is shortened to: http: // localhost/index/indexhttp: // localhost/index. php/wechat/index is shortened to: http: // localhost/wechat/index
Hide index. php. This is relatively simple. Just enable the. htaccess support. Execute Baidu for specific configuration. I use apache2 to create a soft connection.
ln -s
configuration file to generate Makefile:./configureGenerate shared libraries (such as redis.so): MakeCommand line prompt to execute "make test", although not necessary, but careful to sail the boat AH ~ Brother!! If there's no problem here, let's move on.Install: Make installThe end result is that the software has been installed in/usr/lib/php5/20121212/redis.so, the essence of which is to copy the shared library files that we generated earlier, and so on.Wait a moment, but, now the problem is,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.