what is the CLI command that will enable me to see what packages are installed with a vagrant box

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

what is the CLI command that will enable me to see what packages are installed with a vagrant box

Vagrant mailing list
hi

i still new to vagrant and a little confused by it.   i installed  a pre-configured vagrant box (this enabled me to install a zend 3 framework) . i now want to do two things.

i want to to be  able to use my command line to see what packages (php, mysql etc) are installed with it. in short i want to see how its configured. 

secondly i want to be able to access the php info page from my browser. 

below is the vagrant file. i am able to access the php from   http://localhost:8080/   but have no idea how to access the php files/php info or to determine whether mysql is install. (and if mysql is not install- how to install it and make it available to my project)



@script = <<SCRIPT
# Install dependencies
apt-get update
apt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0

# Configure Apache
echo "<VirtualHost *:80>
DocumentRoot /var/www/public
AllowEncodedSlashes On

<Directory /var/www/public>
Options +Indexes +FollowSymLinks
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
AllowOverride All
</Directory>


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = 'bento/ubuntu-16.04'
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.synced_folder '.', '/var/www'
  config.vm.provision 'shell', inline: @script

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--name", "ZF Application - Ubuntu 16.04"]
  end
end

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what is the CLI command that will enable me to see what packages are installed with a vagrant box

Alvaro Miranda Aguilera
Hello

I think your script is incomplete

it should include the destination file for the echo and should end with SCRIPT

So in overall the steps are:

install the packages, done

i would suggest check first the owner (numeric) for the /var/www folder and create a new mount point

ie 

 config.vm.synced_folder 'www', '/var/www', create: true, :mount_options => ["uid=510,gid=510"]

replace 510/510 with the id of the user/group that owns the current /var/www

then put a index.php there that include php info

ie:
<?php phpinfo() ?>

if you can put your project into github, will be easier to review and try and send a PR for fixes/improvements

Alvaro


On Thu, Apr 20, 2017 at 3:29 PM, 'paul kendal' via Vagrant <[hidden email]> wrote:
hi

i still new to vagrant and a little confused by it.   i installed  a pre-configured vagrant box (this enabled me to install a zend 3 framework) . i now want to do two things.

i want to to be  able to use my command line to see what packages (php, mysql etc) are installed with it. in short i want to see how its configured. 

secondly i want to be able to access the php info page from my browser. 

below is the vagrant file. i am able to access the php from   http://localhost:8080/   but have no idea how to access the php files/php info or to determine whether mysql is install. (and if mysql is not install- how to install it and make it available to my project)



@script = <<SCRIPT
# Install dependencies
apt-get update
apt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0

# Configure Apache
echo "<VirtualHost *:80>
DocumentRoot /var/www/public
AllowEncodedSlashes On

<Directory /var/www/public>
Options +Indexes +FollowSymLinks
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
AllowOverride All
</Directory>


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = 'bento/ubuntu-16.04'
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.synced_folder '.', '/var/www'
  config.vm.provision 'shell', inline: @script

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--name", "ZF Application - Ubuntu 16.04"]
  end
end

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exyeZj63NQ%3DdC5dJ4Y5_1v-kXtLy%2Bj0XgJCxRfFs%3DH9UQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what is the CLI command that will enable me to see what packages are installed with a vagrant box

Vagrant mailing list
Hi Alvaro 

thanks so much for replying; 

here is my git repo  : 



you will notice that there is no mysql. i need to add mysql and then be able to access it . 

thanks for kind help 


On Thursday, April 20, 2017 at 2:38:30 PM UTC+1, Alvaro Miranda Aguilera wrote:
Hello

I think your script is incomplete

it should include the destination file for the echo and should end with SCRIPT

So in overall the steps are:

install the packages, done

i would suggest check first the owner (numeric) for the /var/www folder and create a new mount point

ie 

 config.vm.synced_folder 'www', '/var/www', create: true, :mount_options => ["uid=510,gid=510"]

replace 510/510 with the id of the user/group that owns the current /var/www

then put a index.php there that include php info

ie:
<?php phpinfo() ?>

if you can put your project into github, will be easier to review and try and send a PR for fixes/improvements

Alvaro


On Thu, Apr 20, 2017 at 3:29 PM, 'paul kendal' via Vagrant <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WBJZx7R-AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagra...@...> wrote:
hi

i still new to vagrant and a little confused by it.   i installed  a pre-configured vagrant box (this enabled me to install a zend 3 framework) . i now want to do two things.

i want to to be  able to use my command line to see what packages (php, mysql etc) are installed with it. in short i want to see how its configured. 

secondly i want to be able to access the php info page from my browser. 

below is the vagrant file. i am able to access the php from   <a href="http://localhost:8080/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A8080%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHav3I9_aV-3Af2UKEFgwwK-QWYeQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flocalhost%3A8080%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHav3I9_aV-3Af2UKEFgwwK-QWYeQ&#39;;return true;">http://localhost:8080/   but have no idea how to access the php files/php info or to determine whether mysql is install. (and if mysql is not install- how to install it and make it available to my project)



@script = <<SCRIPT
# Install dependencies
apt-get update
apt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0

# Configure Apache
echo "<VirtualHost *:80>
DocumentRoot /var/www/public
AllowEncodedSlashes On

<Directory /var/www/public>
Options +Indexes +FollowSymLinks
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
AllowOverride All
</Directory>


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = 'bento/ubuntu-16.04'
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.synced_folder '.', '/var/www'
  config.vm.provision 'shell', inline: @script

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--name", "ZF Application - Ubuntu 16.04"]
  end
end

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WBJZx7R-AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/2fd04023-0d2e-4939-9b3c-635355a83070%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what is the CLI command that will enable me to see what packages are installed with a vagrant box

Alvaro Miranda Aguilera
Try something like this:


take note that is not a Vagrant question, is more OS question, but if you have doubts, feel free to ask.

Alvaro.

On Thu, Apr 20, 2017 at 4:56 PM, 'paul kendal' via Vagrant <[hidden email]> wrote:
Hi Alvaro 

thanks so much for replying; 

here is my git repo  : 



you will notice that there is no mysql. i need to add mysql and then be able to access it . 

thanks for kind help 


On Thursday, April 20, 2017 at 2:38:30 PM UTC+1, Alvaro Miranda Aguilera wrote:
Hello

I think your script is incomplete

it should include the destination file for the echo and should end with SCRIPT

So in overall the steps are:

install the packages, done

i would suggest check first the owner (numeric) for the /var/www folder and create a new mount point

ie 

 config.vm.synced_folder 'www', '/var/www', create: true, :mount_options => ["uid=510,gid=510"]

replace 510/510 with the id of the user/group that owns the current /var/www

then put a index.php there that include php info

ie:
<?php phpinfo() ?>

if you can put your project into github, will be easier to review and try and send a PR for fixes/improvements

Alvaro


On Thu, Apr 20, 2017 at 3:29 PM, 'paul kendal' via Vagrant <[hidden email]> wrote:
hi

i still new to vagrant and a little confused by it.   i installed  a pre-configured vagrant box (this enabled me to install a zend 3 framework) . i now want to do two things.

i want to to be  able to use my command line to see what packages (php, mysql etc) are installed with it. in short i want to see how its configured. 

secondly i want to be able to access the php info page from my browser. 

below is the vagrant file. i am able to access the php from   http://localhost:8080/   but have no idea how to access the php files/php info or to determine whether mysql is install. (and if mysql is not install- how to install it and make it available to my project)



@script = <<SCRIPT
# Install dependencies
apt-get update
apt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0

# Configure Apache
echo "<VirtualHost *:80>
DocumentRoot /var/www/public
AllowEncodedSlashes On

<Directory /var/www/public>
Options +Indexes +FollowSymLinks
DirectoryIndex index.php index.html
Order allow,deny
Allow from all
AllowOverride All
</Directory>


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = 'bento/ubuntu-16.04'
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.synced_folder '.', '/var/www'
  config.vm.provision 'shell', inline: @script

  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--name", "ZF Application - Ubuntu 16.04"]
  end
end

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/a3f2f7ec-9a0e-4219-85ad-70b7219b5544%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/2fd04023-0d2e-4939-9b3c-635355a83070%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ew2A%3DJm257JAPB_Ce%3DSO6dSc4oULz0-mFKeRdJfkm2YMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.