This assumes you bothered to go through the brew installation process:
https://github.com/mxcl/homebrew/wiki/installation
Install nginx and MySQL
sudo brew install mysql nginxWhile you are waiting prep the Mediawiki directory
Download and extract mediawiki
sudo mkdir -p /var/www/curl -s http://dumps.wikimedia.org/mediawiki/1.18/mediawiki-1.18.0.tar.gz | sudo tar zxfv - -c /var/www/sudo ln -s /var/www/mediawiki-1-18.0 /var/www/mediawiki*I like to keep track of what version I am on, hence the symlink
Install PHP
Use a non-standard PHP recipe to install PHP.
*This must be done after the previous brew command finishes.
*This must be done after the previous brew command finishes.
brew install https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb --with-mysql
Start php in fast cgi mode
sudo php-cgi -b /tmp/php-fcgi.sock
Unfortunately this hasn't been merged in to the brew upstream.
Configure MySQL
Some initial setup that you will need to perform before you can start the MySQL server.
Install the basic tables MySQL requires
/usr/local/bin/mysql_install_db --basedir=/usr/local/ --datadir=/usr/local/var/mysql/
*Since brew links these files in to your /usr/local it may look weird but rest assured they are easily removed using the brew package system.
Start mysql
/usr/local/bin/mysqld
That's it for MySQL server it should now be running, the default password is nothing so keep this in mind.
Test it is running by connecting to the server locally
/usr/local/bin/mysql -u rootConfigure nginx
Edit /usr/local/etc/nginx/nginx.conf and add in the following server definitions:
server {
server_name wiki.mine.org;
root /var/www/mediawiki;
client_max_body_size 5m;
client_body_timeout 60;
location / {
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?title=$1&$args;
}
location ^~ /maintenance/ {
return 403;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/tmp/php-fcgi.sock;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
try_files $uri /index.php;
expires max;
log_not_found off;
}
location = /_.gif {
expires max;
empty_gif;
}
location ^~ /cache/ {
deny all;
}
location /dumps {
root /var/www/mediawiki/local;
autoindex on;
}
}
Edit /usr/local/etc/nginx/fastcgi_params
Under:
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
Add in:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
**If you do not do this you will see an error like: "No input file specified." when you try to go to the server.
Under:
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
Add in:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
**If you do not do this you will see an error like: "No input file specified." when you try to go to the server.
Start NGINX
sudo /usr/local/sbin/nginx
Start up daemons and Configure
Throughout the doc there are some daemons that you need to start, I am will list them here again:
Mysql
sudo /usr/local/bin/mysqld
NGINX
sudo /usr/local/sbin/nginxPHP Fast CGI Support
sudo php-cgi -b /tmp/php-fcgi.sock
That is it!!, perhaps if I am feeling up to it later I will write an article on plists so that all the daemons start automatically on reboot.
Security Notes
This is the quick and the dirty. I am not add users, configuring things to run as non-admin accounts, and setting permissions on files properly. THESE ARE ALL THINGS YOU SHOULD DO!
izmir
ReplyDeleteErzurum
Diyarbakır
Tekirdağ
Ankara
OX5AX
sakarya
ReplyDeleteelazığ
sinop
siirt
van
VV2E
görüntülü show
ReplyDeleteücretlishow
1KM03
7CB71
ReplyDeleteKastamonu Şehir İçi Nakliyat
Çankaya Boya Ustası
Kırklareli Lojistik
Trabzon Parça Eşya Taşıma
Çerkezköy Marangoz
İstanbul Evden Eve Nakliyat
Yenimahalle Parke Ustası
Erzurum Lojistik
Diyarbakır Parça Eşya Taşıma
8F57E
ReplyDeleteKırıkkale Evden Eve Nakliyat
Afyon Lojistik
İstanbul Şehir İçi Nakliyat
Mamak Boya Ustası
Ordu Lojistik
Kırşehir Evden Eve Nakliyat
Tokat Şehir İçi Nakliyat
Yenimahalle Fayans Ustası
Muğla Şehirler Arası Nakliyat
3054B
ReplyDeleteAdana Şehir İçi Nakliyat
Binance Güvenilir mi
Aion Coin Hangi Borsada
Çanakkale Lojistik
Malatya Lojistik
Edirne Şehir İçi Nakliyat
Yenimahalle Fayans Ustası
Elazığ Şehir İçi Nakliyat
Yalova Şehir İçi Nakliyat