Last active
June 19, 2017 18:28
-
-
Save jwillker/6f4216bb500395520faadbe468355177 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Script for install Mediawiki on centos 6.8 | |
#Manual: https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Red_Hat_Linux | |
# | |
#Run with sudo or root | |
#Update | |
yum -y update | |
yum -y install epel-release | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
#Dependcias | |
yum -y install httpd php-mysql php-gd mysql-server php-xml mysql | |
yum --enablerepo=remi,remi-php55 -y update | |
yum --enablerepo=remi,remi-php55 -y install php php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-mbstring | |
service mysqld start | |
mysql_secure_installation | |
mysql -u root -p | |
#At the database prompt, Create the wiki user: | |
# CREATE USER 'wiki'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED'; | |
# | |
#Create the database: | |
# CREATE DATABASE database_name; | |
# | |
#Grant privileges to newly created DB: | |
#GRANT ALL PRIVILEGES ON database_name.* TO 'wiki'@'localhost'; | |
#FLUSH PRIVILEGES; | |
#exit | |
#Start Apache and MySQL on boot. | |
chkconfig httpd on | |
chkconfig mysqld on | |
#Install MediaWiki: | |
cd /var/www | |
wget http://releases.wikimedia.org/mediawiki/1.28/mediawiki-1.28.2.tar.gz | |
tar -zxf mediawiki-1.28.2.tar.gz | |
ln -s mediawiki-1.28.2/ mediawiki | |
chown -R apache:apache /var/www/mediawiki-1.28.2 | |
chown -R apache:apache /var/www/mediawiki | |
service httpd restart | |
firewall-cmd --add-service=http | |
firewall-cmd --add-service=https | |
restorecon -FR /var/www/mediawiki-1.28.2/ | |
restorecon -FR /var/www/mediawiki | |
#Change on /etc/httpd/conf/httpd.conf | |
#DocumentRoot "/var/www/html" to: DocumentRoot "/var/www" | |
#restart httpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment