Инсталиране на LAMP СЪРВЪР в Linux Fedora 19 - 2 част

Днес се порових за други материали в гугъл и се спрях на една полезна статия:

Installing Apache2 With PHP5 And MySQL Support On Fedora 19 (LAMP)
Сега се реших да пробвам техния метод и се оказа успешен.

Какво трябва да направите?

1. Отворете терминала - конзолата с командния интерпретатор - command line interpreter (CLI) и не го затваряйте, защото той ви е необходим, за да извърпите целия процес:
1.1. въведете su -.
1.2. натиснете клавиш Enter.
1.3. въведете вашата парола, която се задали по-време на инсталацията.
1.4. натиснете клавиш Enter.

2. Инсталация на MYSQL (Maria) DB
напишете следната команда:
yum install mysql mysql-server
2.1. старирайте сървъра MYSQL (Maria) DB със следната команда, като я напишете:
systemctl enable mysqld.service и натиснете клавиш Enter.
2.2. напишете втората комнда:
systemctl start mysqld.service и натиснете клавиш Enter.
(Внимание!!! Най-лесният начин е да задърите терминала отворен и с мишката да копирате текста от сайта, който четете като внимателно следвате стъпките за инсталиране на LAMP СЪРВЪР в Linux Fedora 19 и поставяте текста в терминала - Copy/Paste).
2.3. Въведете mysql_secure_installation и натиснете клавиш Enter и следвайте това указание за поставяне на парола:

[root@server1 ~]# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): <-- ENTER OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] <-- ENTER New password: <-- yourrootsqlpassword Re-enter new password: <-- yourrootsqlpassword Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] <-- ENTER ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] <-- ENTER ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] <-- ENTER - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] <-- ENTER ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! [root@server1 ~]#...






3. Чрез въвеждането на командата yum install httpd вие инсталирата сървъра Apache 2 за Fedora и натиснете Enter.
3.1. въведете командата systemctl enable httpd.service, за да "буутнете" (to boot - да обуя) сървъра Apache.
3.2. въведете командата systemctl start httpd.service. за да стартирате сървъра Apache.
3.3. Отворете вашият браузър и напишете в адресната лента: http://localhost и трябва да получите това:






4. Инсталация на PHP5
4.1. въведете следното: yum install php
4.2. с командата systemctl restart httpd.service рестартирайте сървъра apache2.

5. Тестване (изпробване) на PHP5 информацията.
5.1. в терминала въведете командата: gedit /var/www/html/info.php.
5.2. след като ви се отвори празен документ info.php, напишете:
[< ?php phpinfo(); ? >.
и съхранете документа info.php с клавишната комбинация: Ctrl+S и го затворете.
5.3. отворете вашия браузър и напишете в адресната лента: http:localhost/info.php

6. MYSQL поддръжка на php
6.1. Копирайте от тук: yum install php-mysqlnd php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy и го поставете в терминала и натиснете клавиш Enter.
6.2 Вижте това след като натиснахте клавиша Enter:

Loaded plugins: etckeeper, langpacks, priorities, refresh-packagekit, refresh-updatesd, versionlock
26 packages excluded due to repository priority protections
Package 1:php-pear-1.9.4-20.fc19.noarch already installed and latest version
Package php-xml-5.5.4-1.fc19.i686 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package php-gd.i686 0:5.5.4-1.fc19 will be installed
--> Processing Dependency: libt1.so.5 for package: php-gd-5.5.4-1.fc19.i686
---> Package php-imap.i686 0:5.5.4-1.fc19 will be installed
--> Processing Dependency: libc-client.so.2007 for package: php-imap-5.5.4-1.fc19.i686
---> Package php-ldap.i686 0:5.5.4-1.fc19 will be installed
---> Package php-magickwand.i686 0:1.0.9-6.fc19 will be installed
---> Package php-mbstring.i686 0:5.5.4-1.fc19 will be installed
---> Package php-mcrypt.i686 0:5.5.4-1.fc19 will be installed
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.5.4-1.fc19.i686
---> Package php-mssql.i686 0:5.5.4-1.fc19 will be installed
--> Processing Dependency: php-pdo(x86-32) = 5.5.4-1.fc19 for package: php-mssql-5.5.4-1.fc19.i686
--> Processing Dependency: libsybdb.so.5 for package: php-mssql-5.5.4-1.fc19.i686
---> Package php-mysqlnd.i686 0:5.5.4-1.fc19 will be installed
---> Package php-odbc.i686 0:5.5.4-1.fc19 will be installed
--> Processing Dependency: libodbc.so.2 for package: php-odbc-5.5.4-1.fc19.i686
---> Package php-shout.i686 0:0.9.2-14.fc19 will be installed
---> Package php-snmp.i686 0:5.5.4-1.fc19 will be installed
--> Processing Dependency: net-snmp for package: php-snmp-5.5.4-1.fc19.i686
---> Package php-soap.i686 0:5.5.4-1.fc19 will be installed
---> Package php-tidy.i686 0:5.5.4-1.fc19 will be installed
---> Package php-xmlrpc.i686 0:5.5.4-1.fc19 will be installed
--> Running transaction check
---> Package freetds.i686 0:0.91-6.gitf3ae29d.fc19 will be installed
---> Package libc-client.i686 0:2007f-4.fc19 will be installed
---> Package libmcrypt.i686 0:2.5.8-13.fc19 will be installed
---> Package net-snmp.i686 1:5.7.2-11.fc19 will be installed
--> Processing Dependency: net-snmp-agent-libs = 1:5.7.2-11.fc19 for package: 1:net-snmp-5.7.2-11.fc19.i686
--> Processing Dependency: libnetsnmptrapd.so.30 for package: 1:net-snmp-5.7.2-11.fc19.i686
--> Processing Dependency: libnetsnmpmibs.so.30 for package: 1:net-snmp-5.7.2-11.fc19.i686
--> Processing Dependency: libnetsnmpagent.so.30 for package: 1:net-snmp-5.7.2-11.fc19.i686
---> Package php-pdo.i686 0:5.5.4-1.fc19 will be installed
---> Package t1lib.i686 0:5.1.2-12.fc19 will be installed
---> Package unixODBC.i686 0:2.3.2-1.fc19 will be installed
--> Running transaction check
---> Package net-snmp-agent-libs.i686 1:5.7.2-11.fc19 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Installing:
php-gd i686 5.5.4-1.fc19 updates 181 k
php-imap i686 5.5.4-1.fc19 updates 77 k
php-ldap i686 5.5.4-1.fc19 updates 57 k
php-magickwand i686 1.0.9-6.fc19 fedora 100 k
php-mbstring i686 5.5.4-1.fc19 updates 556 k
php-mcrypt i686 5.5.4-1.fc19 updates 50 k
php-mssql i686 5.5.4-1.fc19 updates 67 k
php-mysqlnd i686 5.5.4-1.fc19 updates 277 k
php-odbc i686 5.5.4-1.fc19 updates 76 k
php-shout i686 0.9.2-14.fc19 fedora 29 k
php-snmp i686 5.5.4-1.fc19 updates 58 k
php-soap i686 5.5.4-1.fc19 updates 217 k
php-tidy i686 5.5.4-1.fc19 updates 55 k
php-xmlrpc i686 5.5.4-1.fc19 updates 76 k
Installing for dependencies:
freetds i686 0.91-6.gitf3ae29d.fc19 fedora 1.1 M
libc-client i686 2007f-4.fc19 fedora 561 k
libmcrypt i686 2.5.8-13.fc19 fedora 101 k
net-snmp i686 1:5.7.2-11.fc19 fedora 325 k
net-snmp-agent-libs i686 1:5.7.2-11.fc19 fedora 644 k
php-pdo i686 5.5.4-1.fc19 updates 130 k
t1lib i686 5.1.2-12.fc19 fedora 155 k
unixODBC i686 2.3.2-1.fc19 updates 409 k

Transaction Summary
==============================================================================================================================
Install 14 Packages (+8 Dependent packages)

Total download size: 5.2 M
Installed size: 22 M
Is this ok [y/d/N]:

6.3 При въпроса Is this ok [y/d/N]: натиснете y за да и натиснете клавиш Enter, за да продължите.

После ще видите това:

Is this ok [y/d/N]: y
Downloading packages:
(1/22): freetds-0.91-6.gitf3ae29d.fc19.i686.rpm | 1.1 MB 00:00:00
(2/22): libc-client-2007f-4.fc19.i686.rpm | 561 kB 00:00:00
(3/22): libmcrypt-2.5.8-13.fc19.i686.rpm | 101 kB 00:00:00
(4/22): net-snmp-5.7.2-11.fc19.i686.rpm | 325 kB 00:00:00
(5/22): net-snmp-agent-libs-5.7.2-11.fc19.i686.rpm | 644 kB 00:00:00
(6/22): php-gd-5.5.4-1.fc19.i686.rpm | 181 kB 00:00:00
(7/22): php-imap-5.5.4-1.fc19.i686.rpm | 77 kB 00:00:00
(8/22): php-ldap-5.5.4-1.fc19.i686.rpm | 57 kB 00:00:00
(9/22): php-mbstring-5.5.4-1.fc19.i686.rpm | 556 kB 00:00:00
(10/22): php-mcrypt-5.5.4-1.fc19.i686.rpm | 50 kB 00:00:00
(11/22): php-mssql-5.5.4-1.fc19.i686.rpm | 67 kB 00:00:00
(12/22): php-mysqlnd-5.5.4-1.fc19.i686.rpm | 277 kB 00:00:00
(13/22): php-odbc-5.5.4-1.fc19.i686.rpm | 76 kB 00:00:00
(14/22): php-magickwand-1.0.9-6.fc19.i686.rpm | 100 kB 00:00:00
(15/22): php-pdo-5.5.4-1.fc19.i686.rpm | 130 kB 00:00:00
(16/22): php-shout-0.9.2-14.fc19.i686.rpm | 29 kB 00:00:00
(17/22): php-snmp-5.5.4-1.fc19.i686.rpm | 58 kB 00:00:00
(18/22): php-soap-5.5.4-1.fc19.i686.rpm | 217 kB 00:00:00
(19/22): php-tidy-5.5.4-1.fc19.i686.rpm | 55 kB 00:00:00
(20/22): php-xmlrpc-5.5.4-1.fc19.i686.rpm | 76 kB 00:00:00
(21/22): unixODBC-2.3.2-1.fc19.i686.rpm | 409 kB 00:00:00
(22/22): t1lib-5.1.2-12.fc19.i686.rpm | 155 kB 00:00:00
------------------------------------------------------------------------------------------------------------------------------
Total 1.5 MB/s | 5.2 MB 00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
etckeeper: pre transaction commit
Installing : php-pdo-5.5.4-1.fc19.i686 1/22
Installing : php-mysqlnd-5.5.4-1.fc19.i686 2/22
Installing : php-tidy-5.5.4-1.fc19.i686 3/22
Installing : php-magickwand-1.0.9-6.fc19.i686 4/22
Installing : php-xmlrpc-5.5.4-1.fc19.i686 5/22
Installing : php-soap-5.5.4-1.fc19.i686 6/22
Installing : php-shout-0.9.2-14.fc19.i686 7/22
Installing : php-ldap-5.5.4-1.fc19.i686 8/22
Installing : php-mbstring-5.5.4-1.fc19.i686 9/22
Installing : unixODBC-2.3.2-1.fc19.i686 10/22
Installing : freetds-0.91-6.gitf3ae29d.fc19.i686 11/22
Installing : libc-client-2007f-4.fc19.i686 12/22
Installing : t1lib-5.1.2-12.fc19.i686 13/22
Installing : 1:net-snmp-agent-libs-5.7.2-11.fc19.i686 14/22
Installing : 1:net-snmp-5.7.2-11.fc19.i686 15/22
Installing : libmcrypt-2.5.8-13.fc19.i686 16/22
Installing : php-mcrypt-5.5.4-1.fc19.i686 17/22
Installing : php-snmp-5.5.4-1.fc19.i686 18/22
Installing : php-gd-5.5.4-1.fc19.i686 19/22
Installing : php-imap-5.5.4-1.fc19.i686 20/22
Installing : php-mssql-5.5.4-1.fc19.i686 21/22
Installing : php-odbc-5.5.4-1.fc19.i686 22/22
etckeeper: post transaction commit
Verifying : php-mbstring-5.5.4-1.fc19.i686 1/22
Verifying : php-ldap-5.5.4-1.fc19.i686 2/22
Verifying : php-snmp-5.5.4-1.fc19.i686 3/22
Verifying : php-pdo-5.5.4-1.fc19.i686 4/22
Verifying : php-odbc-5.5.4-1.fc19.i686 5/22
Verifying : libmcrypt-2.5.8-13.fc19.i686 6/22
Verifying : php-mysqlnd-5.5.4-1.fc19.i686 7/22
Verifying : freetds-0.91-6.gitf3ae29d.fc19.i686 8/22
Verifying : php-gd-5.5.4-1.fc19.i686 9/22
Verifying : php-shout-0.9.2-14.fc19.i686 10/22
Verifying : php-soap-5.5.4-1.fc19.i686 11/22
Verifying : php-mcrypt-5.5.4-1.fc19.i686 12/22
Verifying : php-xmlrpc-5.5.4-1.fc19.i686 13/22
Verifying : php-imap-5.5.4-1.fc19.i686 14/22
Verifying : unixODBC-2.3.2-1.fc19.i686 15/22
Verifying : php-magickwand-1.0.9-6.fc19.i686 16/22
Verifying : 1:net-snmp-agent-libs-5.7.2-11.fc19.i686 17/22
Verifying : php-mssql-5.5.4-1.fc19.i686 18/22
Verifying : 1:net-snmp-5.7.2-11.fc19.i686 19/22
Verifying : t1lib-5.1.2-12.fc19.i686 20/22
Verifying : libc-client-2007f-4.fc19.i686 21/22
Verifying : php-tidy-5.5.4-1.fc19.i686 22/22

Installed:
php-gd.i686 0:5.5.4-1.fc19 php-imap.i686 0:5.5.4-1.fc19 php-ldap.i686 0:5.5.4-1.fc19
php-magickwand.i686 0:1.0.9-6.fc19 php-mbstring.i686 0:5.5.4-1.fc19 php-mcrypt.i686 0:5.5.4-1.fc19
php-mssql.i686 0:5.5.4-1.fc19 php-mysqlnd.i686 0:5.5.4-1.fc19 php-odbc.i686 0:5.5.4-1.fc19
php-shout.i686 0:0.9.2-14.fc19 php-snmp.i686 0:5.5.4-1.fc19 php-soap.i686 0:5.5.4-1.fc19
php-tidy.i686 0:5.5.4-1.fc19 php-xmlrpc.i686 0:5.5.4-1.fc19

Dependency Installed:
freetds.i686 0:0.91-6.gitf3ae29d.fc19 libc-client.i686 0:2007f-4.fc19 libmcrypt.i686 0:2.5.8-13.fc19
net-snmp.i686 1:5.7.2-11.fc19 net-snmp-agent-libs.i686 1:5.7.2-11.fc19 php-pdo.i686 0:5.5.4-1.fc19
t1lib.i686 0:5.1.2-12.fc19 unixODBC.i686 0:2.3.2-1.fc19

Complete!

6.4 копирайте и поставете в терминала следната команда:
yum install php-opcache и натиснете клавиша Enter.

yum install php-opcache
Loaded plugins: etckeeper, langpacks, priorities, refresh-packagekit, refresh-updatesd, versionlock
26 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-opcache.i686 0:5.5.4-1.fc19 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Installing:
php-opcache i686 5.5.4-1.fc19 updates 116 k

Transaction Summary
==============================================================================================================================
Install 1 Package

Total download size: 116 k
Installed size: 255 k
Is this ok [y/d/N]:

6.5. Натиснете y клавиша за "ДА" и следтова натиснете клавиш Enter за потвърдите.

Is this ok [y/d/N]: y
Downloading packages:
php-opcache-5.5.4-1.fc19.i686.rpm | 116 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
etckeeper: pre transaction commit
Installing : php-opcache-5.5.4-1.fc19.i686 1/1
etckeeper: post transaction commit
Verifying : php-opcache-5.5.4-1.fc19.i686 1/1

Installed:
php-opcache.i686 0:5.5.4-1.fc19

Complete!

6.6. Рестартирайте Apache2 с тази команда: systemctl restart httpd.service и натиснете клавиш Enter.
6.7. Отворете вашия браузър и в адресната лента копирайте и вмъкнете: http://localhost/info.php и ще видите какво има.

7. Инсталиране на phpmyadmin.
7.1. в конзолата въведете командата:
yum install phpmyadmin и натиснете клавиш Enter за потвърждение.
Loaded plugins: etckeeper, langpacks, priorities, refresh-packagekit, refresh-updatesd, versionlock
26 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-opcache.i686 0:5.5.4-1.fc19 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Installing:
php-opcache i686 5.5.4-1.fc19 updates 116 k

Transaction Summary
==============================================================================================================================
Install 1 Package

Total download size: 116 k
Installed size: 255 k

7.2. Щом видите това Is this ok [y/d/N]: натиснете клавиш у за отговор "да" и натиснете клавиш Enter и вижте това:

Downloading packages:
php-opcache-5.5.4-1.fc19.i686.rpm | 116 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
etckeeper: pre transaction commit
Installing : php-opcache-5.5.4-1.fc19.i686 1/1
etckeeper: post transaction commit
Verifying : php-opcache-5.5.4-1.fc19.i686 1/1

Installed:
php-opcache.i686 0:5.5.4-1.fc19

Complete!

7.3. За рестартиране на сървъра Apache въведете тази команда: systemctl restart httpd.service и натиснете клавиша Enter, за да потвърдите.

7.4. Отворете вашият браузър и напишете:

http://localhost/phpmyadmin

1).

2).


3).


Сравнявайте всичко, което съм обяснил със самия сайт на този линк:
(там има по-добри обяснения).

http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-fedora-19-lamp.

Тук исках само да поясня по подробно как се работи с конзолата - command line interpreter (CLI) за по-голяма яснота.

Ето още един полезен сайт урок как да си инсталираме Wordpress в lamp server в Линукс
Федора.


Няма коментари:

Публикуване на коментар