Archlinux ARM
============
mkfs.ext2 /dev/sda1
cd /tmp
mkdir alarm
mount /dev/sda1 alarm
cd alarm
wget
http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
tar -xzvf ArchLinuxARM-armv5te-latest.tar.gz
rm ArchLinuxARM-armv5te-latest.tar.gz
sync
nano etc/hostname
Prashant-GoFlex
cd ..
umount alarm
tune2fs -L "rootfs" /dev/sda1
reboot
timedatectl set-timezone Asia/Kolkata
Pacman
=======
pacman -Scc
pacman -Sy
pacman -Syu
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
nano /etc/pacman.d/mirrorlist
# before the line with mirror.archlinux.org and uncomment one of the other lines.
vsftpd
======
pacman -Sy vsftpd
cp /etc/vsftpd.conf /etc/vsftpd.conf.bak
nano /etc/vsftpd.conf
local_enable=YES
write_enable=YES
local_umask=022
local_root=/
systemctl start vsftpd
systemctl enable vsftpd.service
journalctl -u vsftpd
Apache
======
pacman -Sy apache php php-apache
nano /etc/httpd/httpd.conf
ServerName localhost
LoadModule php5_module modules/libphp5.so
To use mod_mpm_prefork, open /etc/httpd/conf/httpd.conf and replace
LoadModule mpm_event_module modules/mod_mpm_event.so
with
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
Add this line on Include list (place at end) :
Include conf/extra/php5_module.conf
Add this line on nano /etc/httpd/conf/mime.types
application/x-httpd-php php php5
systemctl start httpd
systemctl enable httpd
systemctl status httpd
journalctl -u httpd
/srv/http
Lighttpd
========
pacman -Sy lighttpd php php-cgi php-sqlite sqlite
cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.bak
cp /etc/php/php.ini /etc/php/php.ini.bak
nano /etc/lighttpd/lighttpd.conf
systemctl start lighttpd
systemctl stop lighttpd
systemctl enable lighttpd
PHP-CGI
nano /etc/lighttpd/conf.d/cgi.conf Add the following to it:
server.modules += ( "mod_cgi" )
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl",
".rb" => "/usr/bin/ruby",
".erb" => "/usr/bin/eruby",
".py" => "/usr/bin/python",
".php" => "/usr/bin/php-cgi" )
index-file.names += ( "index.pl", "default.pl",
"index.rb", "default.rb",
"index.erb", "default.erb",
"index.py", "default.py",
"index.php", "default.php" )
nano /etc/php/php.ini
cgi.fix_pathinfo = 1
In your Lighttpd configuration file, nano /etc/lighttpd/lighttpd.conf add:
include "conf.d/cgi.conf"
PHP-FCGI
nano /etc/lighttpd/fastcgi.conf
# Make sure to install php and php-cgi. See:
#
https://wiki.archlinux.org/index.php/Fastcgi_and_lighttpd#PHP
server.modules += ("mod_fastcgi")
# Configure a FastCGI server which handles PHP requests.
#
index-file.names += ("index.php")
fastcgi.server = (
# Load-balance requests for this path...
".php" => (
# ... among the following FastCGI servers. The string naming each
# server is just a label used in the logs to identify the server.
"localhost" => (
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php-fastcgi.sock",
# breaks SCRIPT_FILENAME in a way that PHP can extract PATH_INFO
# from it
"broken-scriptfilename" => "enable",
# Launch (max-procs + (max-procs * PHP_FCGI_CHILDREN)) procs, where
# max-procs are "watchers" and the rest are "workers". See:
#
https://redmine.lighttpd.net/projec...ow-many-php-CGI-processes-will-lighttpd-spawn
"max-procs" => 4, # default value
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "1" # default value
)
)
)
)
lighttpd -t -f /etc/lighttpd/lighttpd.conf
nano /etc/lighttpd/fastcgi.conf
include "mono.conf"
server.modules += ( "mod_fastcgi" )
fastcgi.server = (
"" => ((
"socket" => mono_shared_dir + "fastcgi-mono-server4",
"bin-path" => mono_fastcgi_server,
"bin-environment" => (
"PATH" => "/bin:/usr/bin:" + mono_dir + "bin",
"LD_LIBRARY_PATH" => mono_dir + "lib:",
"MONO_SHARED_DIR" => mono_shared_dir,
"MONO_FCGI_LOGLEVELS" => "Standard",
"MONO_FCGI_LOGFILE" => mono_shared_dir + "fastcgi.log",
"MONO_FCGI_ROOT" => mono_fcgi_root,
"MONO_FCGI_APPLICATIONS" => mono_fcgi_applications
),
"max-procs" => 1,
"check-local" => "disable"
))
)
nano /etc/lighttpd/mono.conf
index-file.names += ( "index.aspx", "default.aspx", "Default.aspx" )
var.mono_dir = "/usr/"
var.mono_shared_dir = "/tmp/"
var.mono_fastcgi_server = mono_dir + "bin/" + "fastcgi-mono-server4"
### The root of your applications
# For apps installed under the lighttpd document root, use:
var.mono_fcgi_root = server.document-root
### Application map
# A comma separated list of virtual directory and real directory
# for all the applications we want to manage with this server. The
# virtual and real dirs. are separated by a colon.
var.mono_fcgi_applications = "/:."
PostgreSQL
=========
pacman -S postgresql php-pgsql
su postgres
initdb -D '/var/lib/postgres/data'
exit
systemctl start postgresql
systemctl enable postgresql
PostgreSQL is now running. By creating another PostgreSQL user as per your local Arch user ($USER), you can access the PostgreSQL database shell directly instead of having to log in as the postgres user:
createuser -s -U postgres --interactive
Enter name of role to add: root
(Substitute myUsualArchLoginName for your Arch login name.)
Now you can create databases and access them as an Arch user. Here's an example:
createdb Testdb
Use the psql command to access the PostgreSQL database shell, psql. (-d specifies the database to connect to.)
psql -d Testdb
Since you have yet to create any tables and input any data into this database, just list all the database's users and their permissions:
\du
You should have two users: postgres and your Arch login user.
Type \q or CTRL+d to exit the PostgreSQL database shell back to your command line.
Some psql commands to keep handy
command explanation
\c databaseName connect to a particular database
\du list all users and their permission levels
\dt shows summary information about all tables in the current database
\q or CTRL+d exit/quit the psql shell
https://wiki.archlinux.org/index.php/PhpPgAdmin
journalctl -u postgresql
nano /etc/php/php.ini
Samba
======
pacman -Sy samba
nano /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
server string = Prashant-GoFlex
netbios name = Prashant-GoFlex
security = share
load printers = no
printing = bsd
printcap name = /dev/null
disable spools = yes
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072 SO_KEEPALIVE
public = yes
[GoFlex Downloads]
path = /var/lib/transmission/Downloads
read only = no
public = yes
writable = yes
force user = samba
force group = samba
systemctl start smbd nmbd
systemctl enable smbd nmbd
smbpasswd -a root
pdbedit -a -u root
Samba SWAT
===========
nano /usr/lib/systemd/system/swat.socket
systemctl start swat.socket
systemctl enable swat.socket
Transmission
===========
pacman -Sy transmission-cli
systemctl start transmission
systemctl stop transmission
nano /var/lib/transmission/.config/transmission-daemon/settings.json
systemctl enable transmission.service
journalctl -u transmission
chmod 0777 /dir
MiniDLNA
========
pacman -Sy minidlna
nano /etc/minidlna.conf
systemctl start minidlna
systemctl stop minidlna
systemctl enable minidlna.service
System
======
systemctl -t service
systemctl -t socket
systemctl -t target
systemctl status "service name"
journalctl -xn
pacman -Sy htop