Created
February 6, 2018 00:54
-
-
Save 174n/5556d3e07b584429ad34a90da16c2947 to your computer and use it in GitHub Desktop.
Tiny Core Linux: LAMP
This file contains hidden or 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
qemu/qemu-img.exe create -f vpc tc.vhd 4G | |
--- | |
qemu\qemu-system-i386 -L qemu\bios.bin -m 1024 -kernel vmlinuz -initrd core.gz -hda tc.vhd -append "home=sda1 opt=sda1 tce=sda1" -redir tcp:2222::22 -redir tcp:80::80 -nographic | |
--- | |
printf "o\nn\np\n1\n\n\nw\n" | sudo fdisk /dev/sda | |
sudo mkfs.ext4 /dev/sda1 | |
sudo reboot | |
--- | |
tce-load -wi openssh | |
cd /usr/local/etc/ssh/ | |
sudo cp ssh_config.example ssh_config | |
sudo /usr/local/etc/init.d/openssh start | |
sudo passwd tc | |
sudo echo '/usr/local/etc/ssh' >> /opt/.filetool.lst | |
sudo echo '/etc/shadow' >> /opt/.filetool.lst | |
sudo echo '/usr/local/etc/init.d/openssh start &' >> /opt/bootlocal.sh | |
filetool.sh -b | |
tce-load -wi mariadb mariadb-client | |
mkdir /opt/mysql | |
cp -Lr /usr/local/mysql/data /opt/mysql/ | |
sudo rm -rf /opt/mysql/data/ib* | |
printf '\n# MySQL\nrm -rf /usr/local/mysql/data\nln -s /opt/mysql/data /usr/local/mysql/data\nln -sf /opt/mysql/my.cnf /usr/local/mysql/my.cnf\nsudo -u tc /usr/local/mysql/bin/mysqld_safe 2>&1 > /dev/null &' >> /opt/bootlocal.sh | |
sudo printf "\nTERM="linux"\nexport TERM" >> "/home/tc/.profile" | |
sudo echo '/home/tc/.profile' >> /opt/.filetool.lst | |
filetool.sh -b | |
sudo reboot | |
--- | |
mysql -u root | |
CREATE DATABASE wordpress_db_01; | |
GRANT ALL PRIVILEGES ON wordpress_db_01.* TO "wordpress_user_01"@"localhost" IDENTIFIED BY "password"; | |
FLUSH PRIVILEGES; | |
exit | |
tce-load -wi apache2-mod-php5 | |
printf '\n# Apache\nrm -rf /usr/local/apache2/htdocs\nln -s /opt/apache2/htdocs /usr/local/apache2/htdocs\nln -sf /opt/apache2/httpd.conf /usr/local/apache2/conf/\napachectl start' >> /opt/bootlocal.sh | |
mkdir -p /opt/apache2/htdocs | |
sudo cp /usr/local/apache2/conf/httpd.conf /opt/apache2/ | |
sudo vi /opt/apache2/httpd.conf | |
#ServerName 127.0.0.1 | |
touch /opt/apache2/htdocs/.htaccess | |
echo 'DirectoryIndex index.php index.html' > /opt/apache2/htdocs/.htaccess | |
sudo vi /opt/apache2/httpd.conf | |
# <Directory "/usr/local/apache2/htdocs"> ==> Change the AllowOverride line from None to All. | |
tce-load -wi curl | |
curl -o /tmp/latest.zip https://wordpress.org/latest.zip -k | |
unzip /tmp/latest.zip -d /tmp/ | |
mv /tmp/wordpress/* /opt/apache2/htdocs/ | |
filetool.sh -b | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not .sh file. You should type all commands by hand