Skip to content

Instantly share code, notes, and snippets.

@icq4ever
Last active July 29, 2019 13:12
Show Gist options
  • Save icq4ever/0570c4e2b55f766c6b7e7853d8b239e3 to your computer and use it in GitHub Desktop.
Save icq4ever/0570c4e2b55f766c6b7e7853d8b239e3 to your computer and use it in GitHub Desktop.
majaro on thinkStation OF setup guide

setup OF on thinkStation Tiny Series

burn majaro distros DISK

  • download from manjaro.org
  • burn ISO to USB disk with rufus (windows)

boot with ISO live media

  • disable secure boot option
  • change boot order, press F12 when boot

install manjaro distro

  • setup TZ / keyboard layout / language
  • boot live media
  • install manjaro to disk
    • boot password / root password seperate for secure

system setup / tuning

install Yaourt

$ sudo pacman -S --needed base-devel git wget yajl
$ cd /tmp
$ git clone https://aur.archlinux.org/package-query.git
$ cd package-query/
$ makepkg -si && cd /tmp/
$ git clone https://aur.archlinux.org/yaourt.git
$ cd yaourt/
$ makepkg -si

system update

$ sudo pacman-mirros -g # update mirror server database
$ pacman -Syy
$ sudo pacman -Syu 
$ sudo pacman -S git zsh nimf rofi terminator nodejs npm vim

nimf input method

$ sudo pacman -S nimf
  • after install, put into ~/.xprofile
nimf-daemon
nimf-indicator
export GTK_IM_MODULE="nimf"
export QT4_IM_MODULE="nimf"
export QT_IM_MODULE="nimf"
export XMODIFIERS="@im=nimf"
  • logout / login

zsh

$ chsh -s /usr/bin/zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# set theme depoggi

etc utils

$ yaourt -s visual-studio-code-bin
$ yaourt -s qtcreator

etc setups


setup openframeworks

$ https://github.com/openframeworks/openframeworks
$ mv openframeworks oF
$ cd oF/scripts/linux
$ ./download_libs.sh
$ cd archlinux/
$ sudo ./install_dependencies.sh
$ sudo ./install_codecs.sh
$ cd ~/oF/scripts/linux
$ ./compileOF.sh

# setup projectGenerator
$ cd ~/oF
$ git usbmodule init && git submodule update
$ cd apps/projectGenerator/ && make Release -C ./commandLine
$ sudo ln -s ~/oF/apps/projectGenerator/commandLine/bin/projectGenerator /usr/bin/projectGenerator

# add to .zshrc
  export PG_OF_PATH=~/oF
  alias pg="projectGenerator"
  alias oF="cd ~/oF"
  alias apps="cd ~/oF/apps"
  alias addons="cd ~/oF/addons"

setting nginx, mysql, phpmyadmin

nginx

$ sudo pacman -S nginx-mainline
$ sudo vi /etc/nginx/nginx.conf
...
http{
  types_hash_max_size 4096;
  server_names_hash_bucket_size 128;
  ...
}

...

$ sudo systemctl start nginx

mysql

$ sudo pacman -S mysql
# choose mariaDB

...
$ sudo mysql_secure_installation
$ sudo mysql -u root
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('PASSWD');
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit
$ sudo systemctl enable mysqld && sudo systemctl start mysqld

phpmyadmin

  • install phpmyadmin with pacman
$ sudo pacman -S phpmyadmin php-fpm
$ sudo ln -s /usr/share/webapps/phpMyAdmin /usr/share/nginx/html/
  • nginx setup
$ sudo vi /etc/nginx/nginx.conf
...
  server {
    ...
    location /{
      ...
      index index.html index.htm index.php;
    }
    
    location /phpmyadmin {
      rewrite ^/* /phpMyAdmin last;
    }
    
    ...
    location ~ \.php$ {
      fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
      fastcgi_index index.php;
      include fastcgi.conf;
      root /usr/share/nginx/html;
      try_files $uri =403;
    }

restart php-fpm, nginx

$ sudo systemctl restart php-fpm && sydo systemctl restart nginx

generate desktop launch

copy some desktop file and replace

$ cd /usr/share/applications
$ sudo cp visual-studio-code.desktop player.desktop
[Desktop Entry]
Exec=terminator -e "/home/admin/oF/apps/myapps/myproject"
Icon=
Terminal=false
Type=Application
Name=player 1.0
Comment=youtube Streaming Player
Categories=utility;
MimeType=text/plain;inode/directory;
StartupNotify=true

autostart desktop file

copy .desktop file to ~/.config/autostart/. that's it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment