Linux command and lamp setup

Source: Internet
Author: User
Tags mcrypt php template unpack

Commands that are purely Linux:
1. Forcibly unload a dependent package: Rpm-e httpd-2.2.15-26.el6.x86_64--nodeps (--nodeps indicates no dependencies)
4. Delete all files in the current directory: RM-RF * (f indicates the meaning of forced deletion
6. Delete all files ending with. GZ: Rm-rf *.gz
2. View all installed packages with keywords: httpd: rpm-qa|grep httpd|php|mysql; The trailing slash indicates or means
5. Unpack and Unpack: (Linux is packaged with a tar package and not compressed): Tar zxvf php-5.2.6.tar.gz
3. View the processes on which the ports are occupied: NETSTAT-TNL
7.redhat series of Centos6.4 Installation Source package method: Install which software to enter which software,./configure--help|grep prefix,
When installing, specify an absolute path, compile each file corresponding to an. o file, the corresponding file will be generated in the corresponding directory when the installation is completed.
8. Branch Percussion command: space plus backslash:
[Email protected] jpeg-6b]#/configure \
>--prefix=/usr/local/jpeg6/\
>--enable-shared \
>--ENABLE-STATC
9. Continuous Directory creation: Mkdir-p/usr/local/jpeg6/man/man1
10. Install Redhat:
There is a need for three ISO, no strange second plate is finished, you will be prompted to insert the second disk
This is no need to worry, just want to exit the virtual machine full screen and then release the mouse in the virtual machine settings more reset
ISO is the second disc, and check connect is still useless!
11. View search in one file: In command mode:? Post_max Enter

Second, the Directory of Common Files:
1. Go to the default directory of httpd to see if httpd is installed by default. Some words are all deleted:
CD/ETC/HTTPD into the default directory of the httpd;
2. Go to a directory where Windows can move files freely download directory:/home/huang-r1/downloads/
4. Move all files under one directory to another directory:
Directory:/HOME/HUANG-R1/DOWNLOADS/LAMP13
Target directory:/USR/SRC
Copy all files under one directory to another directory:
Cp-r/home/huang-r1/downloads/lamp13/. /usr/src
Description
1. The command for copying under Linux is CP.
2, Example: Assume that the replication source directory is x1, the target directory is X2.
3. If the X2 directory does not exist, use the Cp-r x1 x2 directly.
4. If the X2 directory already exists, use Cp-r x1/. X2.
5, for example, the last. It's punctuation, not orders.
6. Modify directory name the destination directory will not exist: mv/usr/src/gd/2.0.35/usr/src/gd/gd-2.0.35

Three. Change the appearance settings for a remote-connected Linux putty:
1. Font Change putty: Modify settings: Font bold, small three; default foreground (font color): Black, default background (background screen): white;
2. ip:192.168.198.129 of virtual machines;


Four. In the virtual machine configuration Centos6.4 configuration lamp encountered practical problems and solutions:
1. Finally also installed./configure--prefix=/usr/local/libpng, prompting zlib not installed, but in fact installed, the last yum install Zlib-devel, but this kind of thing has a general
Workaround: Yum Install zlib*, this is more expensive server resources, because the installation of too much, you can go to the official website to ask what is the dependency package, but need English good!
2. Error encountered when installing JPEG-6B: Workaround: I have yum install libtool*
Finally, it's not going to work, only the configuration file covering the next jpeg-6p:./indicates the current directory
Cp/usr/share/libtool/config/config.sub./
Cp/usr/share/libtool/config/config.guess./
Then make clean
Make && make install on the line

3. Open Apache:
/usr/local/apache2/bin/apachectl start
Shut down:
/usr/local/apache2/bin/apachectl stop

4. Unable to access the virtual machine in the browser and only show it works this is the cache: Shut down the firewall: service iptables Stop can also clean up the iptable rule clear look, every time you start CentOS you need to turn off the firewall unless you write the configuration in the startup file

5.mysql user and Group commands:
set up a MySQL user group: groupadd MySQL
set up dedicated MySQL user assigned to the corresponding group: useradd-g mysql MySQL
watch MySQL user's id:id MySQL
6. Error when loading MySQL: yum-y install ncurses-devel
Reference: http://blog.csdn.net/zccst/article/details/4493074
MySQL compiles and installs also need to add the configuration file:
mysql-5.0.41]# cp support-files/my-medium.cnf/etc/my.cnf
is preceded by a template file:
Create authorization table: bin/ mysql_install_db--user=mysql
7.ll to see the current directory file permissions,
to change the current directory to the root user;
Specify the var data directory is MySQL user control:
Change all current groups to MySQL group ;
MySQL with MySQL user to add a & to run in the background:
/usr/local/mysql/bin/mysqld_safe--user=mysql &
Enter the MySQL command;
View All Users: SELECT * from mysql.user \g
Delete user not native access;
Refresh authorization table: Flush privileges;
Sets the password for the root user of the machine and encrypts it;
Enter user name directly login bin/mysql-u root-h localhost-p
Select database: Use CMS
to create a table: Creating a Tables Shop (ID int, name varchar (+), price Doub Le);
Close mysql:bin/mysqladmin-u root-p shutdown
View boot file: ls/etc/rc.local

Configuration of 8.Apache:
Write Apache and MySQL to the boot file:
[Email protected] mysql]# echo "/usr/local/apache2/bin/apachectl" >>/etc/rc.local
[Email protected] mysql]# echo "/usr/local/mysql/bin/mysqld_safe--user=mysql &" >>/etc/rc.local
View Boot file: cat/etc/rc.local
Apache configuration file This is the directory index in Linux:
<ifmodule dir_module>
DirectoryIndex index.html
</IfModule>

I need starters to find index.php and add a index.php.

9. When compiling PHP:
1. Compile PHP when the hint is not installed, but I clearly remember the result is the development package is not installed:
2.yum install libxml2-devel solved, PHP installation only need to make a directory, the other automatically go back to find this is Yum installation, if it is the source package installation needs to be specified;

10. Prompt Errror:configure:error:libpng. (A|SO) not found. Workaround: Yum install libpng libpng-devel
11. Copy the PHP template configuration file to the corresponding directory: CP Php.ini-dist/usr/local/php/etc/php.ini
12. View the PHP configuration file: Vi/usr/local/php/etc/php.ini

13.ps-aux|grep httpd command: See what users run the Apache process!
14. Change the CMS project in the root directory to the corresponding group user: Chown-r Daemon.daemon cms_demo//All subdirectories get rid of-R
15../configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql/-- With-libxml-dir--with-png-dir=/usr/local/libpng/--with-freetype-dir--with-gd--with-zlib-dir--with-mcrypt=/usr/ local/libmcrypt/--with-mysqli=/usr/local/mysql/bin/mysql_config--enable-soap
--enable-mbstring--enable-sockets
The nipples are all compiled like this:
./configure--prefix=/abcd/php-with-apxs2=/abc/apache/bin/apxs--with-curl--with-mcrypt--enable-mbstring-- With-iconv--with-gd--enable-pdo--with-pdo-mysql=mysqlnd--with-mysqli=mysqlnd--with-mysql=mysqlnd

Linux command and lamp setup

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.