phpMyAdmin & mySql on centOS 7 Installation
|
Concept To get phpMyAdmin to step properly it need some preparation. First the platform, operating system. If you using Windows no worried, just download virtual box, look at software use for more detail. phpMyAdmin is an browser tool to run mySQL and administration work. Since the name phpMyAdmin, indicate that php it require to install php, a progamming language use in web browser. Last it require Apache server some call it "httpd" to be installed. MySQL is an database query and is under community edition. Content Software use A: Install mysql community B: Install php and mysql server C: Install httpd and mod_perl C1: Create phpinfo page D: Install phpmyadmin E: phpMyAdmin : reset mysql password Software use:
Virtual box https://www.virtualbox.org/ Virtual box act as a container allow user to install another operating system on the main operating system. This make easy and simple for developer to access. CentOS https://www.centos.org/download/ CentOS is a linux base machine, is good and easy to configure. However some experience user for centOS 6 might feel kind of stiff in centOS 7. Need to install CentOS 7 in virtual box platform, below is recommend video how to install: https://www.youtube.com/watch?v=Pcl417NR2xc A: install mysql-community
# mkdir /myp # cd /myp # wget http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm # yum localinstall mysql-community-release-el7-7.noarch.rpm Check on repolist. # yum repolist Install remi
#wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm rpm -Uvh remi-release-7.rpm goto remi.repo to enable php 5.6 then yum install php. If did not do this the by default is php5.4 which OCS NG Inventory unable to add user due to password_hash not support in php5.4. B: Install php and mysql-server
Install php # yum install php -y Install mysql-server # yum install mysql-server -y # system enable mysqld.service # system start mysqld.service C: Install httpd and mod_perl
#yum install httpd mod_perl -y Start the Apache #systemctl start httpd Now launch web browser and enter http://localhost you will see page like testing 123... C1: Create phpinfo page
A. Next change the default DocumentRoot directory to your preference directory. for my case I use /myp/www 1. Open the httpd.conf file #vim /etc/httpd/conf/httpd.conf In the line 119 Directory "var/www/html" change to your preference. In the line 124 "<Directory "var/www/html" > change to your preference. In the line 131 "<Directory "var/www/html" > change to your preference. 2. In the line 164 DiretoryIndex index.html, append "index.php" It will look like : In the line 164 DirectoryIndex index.html index.php B. After change the preference directory, next will create phpinfo page. 1. Go to your set directory # cd /myp/www/ 2. Setup index.php # vim /myp/www/index.php paste the code: <?php phpinfo(); ?> This just to show the PHP information on server . D: Install phpMyAdmin
1. install phpMyadmin # yum -y install phpmyadmin 2. Change IP address in: # vim /etc/httpd/conf.d/phpMyAdmin.conf Scroll down and change, the Require ip 127.0.0.1 or Allow from 127.0.0.1 to you host IP address. Require ip <host_IP_address> . . . Allow from <host_IP_address> . . . Require ip <host_IP_address> . . . Allow from <host_IP_address> . . . save file :wq To restart Apache server
# systemctl restart httpd Launch web browser : localhost/phpmyadmin, you will see the phpMyAdmin page E: phpMyAdmin : reset mysql password
RESET mysql passwd. 1. Stop the mysql service # systemctl stop mysqld.service 2. Set the mySQL environment option # systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" 3. Start mysql #systemctl start mysqld 4. Login as root # mysql -u root 5. Update the root user password with these mysql commands mysql> UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPassword') -> WHERE User = 'root' AND Host = 'localhost'; mysql> FLUSH PRIVILEGES; mysql> exit 6. Stop mysql service # systemctl stop mysqld 7. Unset the mySQL environment option # systemctl unset-environment MYSQLD_OPTS 8. Start mysql # systemctl start mysqld 9. Login using your new password: # mysql -u root -p Once you successfully reset mysql password done use mysql_secure_installation to install # mysql_secure_installation Now you will be able to login, localhost/phpmyadmin, with your password.
|
http://superuser.com/questions/66367/is-it-possible-to-install-ctags-without-root-privs
|