After the system updates if you still have:
n packages can be updated. n updates are security updates.
Use the following commands to install all the packages
sudo apt-get dist-upgrade sudo apt-get update sudo apt-get upgrade
Launch the commands from the container folder
docker-compose up -d
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 27378c53e98a eedtest_app "docker-php-entrypoi…" 5 minutes ago Up 5 minutes 0.0.0.0:8899->80/tcp eedtest_app_1 68dfd5c7abde mysql "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 0.0.0.0:3306->3306/tcp eedtest_db_1 b18824235e76 phpmyadmin/phpmyadmin "/run.sh phpmyadmin" 5 minutes ago Up 5 minutes 0.0.0.0:8080->80/tcp eedtest_phpmyadmin_1
doing this you can understand the port to see the webserver.
Clone this repo if you need a LAMP webserver
Immutable file means, that you can’t delete or modify the file when is immutable
To set the immutable attribute unix/linux
chattr +aui .htaccess
To unset the immutable attribute
chattr -aui .htaccess
If you are on linux / OsX or inside a phyton environment you can start a web server on the fly inside your project simply recalling an alias from the terminal in your project folder.
You have to edit your bash profile and add the following line:
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
This feature is very useful when you are working in local host with a browser that disables the
origin load by default (i.e. Chrome).
inserted the alias inside the
.bash_profile, refresh with the following command:
$ source ~/.bash_profile
inside your project folder you just type
$ server to open your web server.
If you are using OSX this is wonderful because you can customise your command line by adding emoji icons to the bash prompt.
You can find icons inside your Edit menu: Edit -> Emoji & Symbols.
How to add custom icons to our bash?
So edit your .bash_profile with your favourite editor vim, nano for example, and add the line:
Open Emoji & Symbol panel and drag and drop your favorite emoji inside quotation marks.
Depending on terminal settings, nothing may be visible after using drag & drop. Close and reopen you terminal and voilà:
You can customise terminal bash with some others options:
|\W||Current working directory (ie: Desktop/)|
|\w||Current working directory with full path|
This is my favourite customisation:
PS1="🌀 \[email protected]\h\W$ "
# yum -y install openssh-server openssh-clients
#start the service
# chkconfig sshd on # service sshd start
service sshd status
AllowUsers user_name and restart:
service sshd restart
more in the wiki here.
For grant sudoers to user in redhat, centos, oralce linux, edit the file
/etc/sudoers and append
username ALL=(ALL) ALL
root ALL=(ALL) ALL
## Next comes the main part: which users can run what software on ## which machines (the sudoers file can be shared between multiple ## systems). ## Syntax: ## ## user MACHINE=COMMANDS ## ## The COMMANDS section may have other options added to it. ## ## Allow root to run any commands anywhere root ALL=(ALL) ALL oracle ALL=(ALL) ALL
The navigation keys in less command are similar to Vim editor.
/ – search for a pattern which will take you to the next occurrence. n – for next match in forward N – for previous match in backward
? – search for a pattern which will take you to the previous occurrence. n – for next match in backward direction N – for previous match in forward direction
For viewing large log files
CTRL+F – forward one window CTRL+B – backward one window CTRL+D – forward half window CTRL+U – backward half window j – navigate forward by one line k – navigate backward by one line G – go to the end of file g – go to the start of file q or ZZ – exit the less pager
Useful other command
v – using the configured editor edit the current file. h – summary of less commands &pattern – display only the matching lines, not all.
You can open multiple files by passing the file names as arguments:
$ less file1 file2
You have to specify the path and folder to share with the service name on virtualBox
for the mount you can use this command:
sudo mount -t vboxsf nome_servizio /shared_name
you need on your linux OS one folder (
for example if the service name is “stage” and the folder name on the system is
shared you can use this command:
sudo mount -t vboxsf stage /shared
for the unmount you can use:
sudo umount -t vboxsf stage /shared
#archive the file without compression.
(1) create tar
cfv tar c=create, f=file (on the disk and not on the tape),v=verbose (show file list).
tar cfv archive.tar *.txt create the file’s archive of all txt files in the same path.
tar -cvf /destination_path/filename.tar /path to put in the tar file
tvf to show the content of the archive:
tar tfv archive.tar
xfv archive file extraction:
tar xfv archive.tar