Installing Neo4j

Neo4j is a graph database management system. To install Neo4j Community Edition, update your Homestead.yaml file with the following configuration option:

neo4j: true
The default Neo4j installation will set the database username to homestead and corresponding password to secret. To access the Neo4j browser, visit http://homestead.test:7474 via your web browser. The ports 7687 (Bolt), 7474 (HTTP), and 7473 (HTTPS) are ready to serve requests from the Neo4j client.

なんだこれ、聞いたことねーぞ
サイトを見てみる。

The Neo4j Graph Platform – The #1 Platform for Connected Data

ああ、好きな人は好きだよね。これ。とりあえず進もう。
Aliases
You may add Bash aliases to your Homestead machine by modifying the aliases file within your Homestead directory:

alias c=’clear’
alias ..=’cd ..’
After you have updated the aliases file, you should re-provision the Homestead machine using the vagrant reload –provision command. This will ensure that your new aliases are available on the machine.
これでやっと半分くらい。

Daily Usage
Accessing Homestead Globally
Sometimes you may want to vagrant up your Homestead machine from anywhere on your filesystem. You can do this on Mac / Linux systems by adding a Bash function to your Bash profile. On Windows, you may accomplish this by adding a “batch” file to your PATH. These scripts will allow you to run any Vagrant command from anywhere on your system and will automatically point that command to your Homestead installation:

Mac / Linux
function homestead() {
( cd ~/Homestead && vagrant $* )
}
Make sure to tweak the ~/Homestead path in the function to the location of your actual Homestead installation. Once the function is installed, you may run commands like homestead up or homestead ssh from anywhere on your system.

Windows
Create a homestead.bat batch file anywhere on your machine with the following contents:

Make sure to tweak the example C:\Homestead path in the script to the actual location of your Homestead installation. After creating the file, add the file location to your PATH. You may then run commands like homestead up or homestead ssh from anywhere on your system.
うん、OK

Connecting Via SSH
You can SSH into your virtual machine by issuing the vagrant ssh terminal command from your Homestead directory.

But, since you will probably need to SSH into your Homestead machine frequently, consider adding the “function” described above to your host machine to quickly SSH into the Homestead box.
ssh接続のportは22でしたね。

scp
SSHを使用してリモートホストとの間でファイルを転送を行う。
ssh-keygen
公開鍵認証方式で使用するキーペアを生成する。
ssh-copy-id
公開鍵をリモートホストに登録するコマンド。環境によってはインストールされていない場合がある。

Connecting To Databases
A homestead database is configured for both MySQL and PostgreSQL out of the box. For even more convenience, Laravel’s .env file configures the framework to use this database out of the box.

To connect to your MySQL or PostgreSQL database from your host machine’s database client, you should connect to 127.0.0.1 and port 33060 (MySQL) or 54320 (PostgreSQL). The username and password for both databases is homestead / secret.

mysqlは33060のよう。
Port 33060 Details
https://www.speedguide.net/port.php?port=33060
33060 udp games Wolfenstein uses ports 33060-33070, developer: Raven Software SG
33060 tcp mysqlx MySQL Database Extended Interface (IANA official)
あ、こりゃすげーわ。

Database Backups
Homestead can automatically backup your database when your Vagrant box is destroyed. To utilize this feature, you must be using Vagrant 2.1.0 or greater. Or, if you are using an older version of Vagrant, you must install the vagrant-triggers plug-in. To enable automatic database backups, add the following line to your Homestead.yaml file:

backup: true
Once configured, Homestead will export your databases to mysql_backup and postgres_backup directories when the vagrant destroy command is executed. These directories can be found in the folder where you cloned Homestead or in the root of your project if you are using the per project installation method.

Adding Additional Sites
Once your Homestead environment is provisioned and running, you may want to add additional Nginx sites for your Laravel applications. You can run as many Laravel installations as you wish on a single Homestead environment. To add an additional site, add the site to your Homestead.yaml file:

sites:
– map: homestead.test
to: /home/vagrant/code/Laravel/public
– map: another.test
to: /home/vagrant/code/another/public
If Vagrant is not automatically managing your “hosts” file, you may need to add the new site to that file as well:

192.168.10.10 homestead.test
192.168.10.10 another.test
Once the site has been added, run the vagrant reload –provision command from your Homestead directory.

Site Types
Homestead supports several types of sites which allow you to easily run projects that are not based on Laravel. For example, we may easily add a Symfony application to Homestead using the symfony2 site type:

sites:
– map: symfony2.test
to: /home/vagrant/code/Symfony/web
type: “symfony2”
おう、なんかsymfonyやたらでてくんなー